Form focus

[RTS]BN+VS*

Well-known member
Joined
Feb 3, 2009
Messages
53
Location
BELGIUM - East Flanders
Programming Experience
1-3
Hey,

I want to check if a form has focus. The .focused property does not return the results I need. When a user is using a control in the form, the property will return false...

How can I check if the user is using my form and not another one?

Cheers
BN
 
Form.ActiveForm or Me.ActiveMdiChild perhaps?
 
Hey,

Thnx! That first method helped me out :D

Here you have how I implemeted it:

VB.NET:
    Private Sub letWindowFlashIfNeeded()
        If Form.ActiveForm IsNot Me Then flasher.Start()
    End Sub

Needed it to let the form flash in the taskbar when a certain task was completed nad there was no focus on the form itself :)

Cheers
BN
 
Back
Top