|
-
Apr 1st, 2001, 06:22 PM
#1
Thread Starter
New Member
A while ago I wrote an button control for friends and I to use. Everything seemed okay with it when I compiled it, and just recently when using a friends program which used the control, I noticed a bug in it. The control has the option to draw a dotted box inside of it when it has focus, which works, and to redraw the face of the button without the dots when it loses focus, which works. What the problem is, is that if the button has focus and the dots drawn on it, and the form loses focus to another window (outside of the project/exe), the button still thinks it has focus and doesn't redraw its face without the dots.
What I was wonder is if anyone know how to let a control know when the form it is on loses/recieves focus over other open windows. Help will be greatly appreciated :).
-
Apr 6th, 2001, 02:00 PM
#2
New Member
Try this, if I understood correctly
'This event should be coded into the form which has Your Command Button On.
Private Sub Form_LostFocus()
YourBTNCommand.Redraw = True/False
End Sub
It's a hard life
Jig32
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|