how can I check whether a handle is still in use??
I have to check whether a form is still loaded??
please help,
VIsualPenguin
Printable View
how can I check whether a handle is still in use??
I have to check whether a form is still loaded??
please help,
VIsualPenguin
Another way is to store the given form's hWnd in a long variable and then later check it using the IsWindow() API call.Code:Private Function IsFormLoaded(byval FormName As String) As Boolean
Dim fThis As Form
For Each fThis In Forms
If fThis.Name = FormName Then
IsFormLoaded = True
Exit Function
End If
Next fThis
End Function
HTH,
Duncan
But to store the .hWnd property you'd cause the form to be loaded first
thanks
visualpenguin