tocos
asked on
detect if form has the focus
Hello,
Is there a way to check if a form has the focus ..
I have made a skin OCX for my applications .. I need the skin to be in different color scheme whenever the form has the focus.
Hesham
Is there a way to check if a form has the focus ..
I have made a skin OCX for my applications .. I need the skin to be in different color scheme whenever the form has the focus.
Hesham
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
tocos:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
Experts: Post your closing recommendations! Who deserves points here?
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
Experts: Post your closing recommendations! Who deserves points here?
ASKER
- Using Screen.ActiveForm.Name on my skin returns error.
- I used GetFocus in a timer control to detect the state of form as follow:
If GetFocus = UserControl.Parent.hWnd Then
Shape1.BackColor = vbRed
Else
Shape1.BackColor = vbWhite
End If
It worked fine in design time but when I run the application it gave getfocus value different than the .hwnd
Regards,
Hesham