|
HWND
Nov 12, 2022 13:27:57 GMT -5
Post by Walt Decker on Nov 12, 2022 13:27:57 GMT -5
On failure HWND(#TAG/#TAG$) should return either zero or some negative number instead of halting, and sometimes crashing an app. In that way the programmer can take an appropriate action, such as continuing with a different task or exiting exiting the app gracefully.
|
|
|
HWND
Dec 3, 2022 21:10:32 GMT -5
Post by Brandon Parker on Dec 3, 2022 21:10:32 GMT -5
Well, you can test for the existence of the handle easily enough. The same can be done for Bitmap handles as well.
Open "Test" For Window As #Main #Main "TrapClose quit"
Print isHwnd("#Main") Print isHwnd("#Main2") Wait
Sub quit handle$ Close #handle$ End End Sub
Function isHwnd(hWnd$) On Error GoTo [Error] isHwnd = Hwnd(#hWnd$) Exit Function [Error] End Function
{:0)
Brandon Parker
|
|