Someone out there please tell me how you can code a form so that it can tell if it is currently the active form.
If you are going to suggest ZOrder or the VBE class please be specific as I have had no luck with either so far.
Thanks
Printable View
Someone out there please tell me how you can code a form so that it can tell if it is currently the active form.
If you are going to suggest ZOrder or the VBE class please be specific as I have had no luck with either so far.
Thanks
Might only need the GetForegroundWindow API.
API:
Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As Long
Code:
If GetForegroundWindow = Me.hWnd Then
'Your form has the focus
Else
'Your form doesn't have the focus
End If
Might be what you want, might not...
Thanks KDivad that solved the problem