|
-
May 23rd, 2000, 08:55 PM
#1
Thread Starter
Addicted Member
Hello,
I'm developing an OCX (a simple Command Button) and
I'm in trouble to draw the focus on it
(EnterFocus/GotFocus properties).
This is my code:
Private Sub UserControl_EnterFocus()
UserControl.ScaleMode = 3
lpRect.Top = 3
lpRect.Left = 3
lpRect.Right = (UserControl.Width \ Screen.TwipsPerPixelX) - 3
lpRect.Bottom = (UserControl.Height \ Screen.TwipsPerPixelY) - 3
DrawFocusRect UserControl.hdc, lpRect
UserControl.ScaleMode = 1
End Sub
Private Sub UserControl_ExitFocus()
UserControl.ScaleMode = 3
lpRect.Top = 3
lpRect.Left = 3
lpRect.Right = (UserControl.Width \ Screen.TwipsPerPixelX) - 3
lpRect.Bottom = (UserControl.Height \ Screen.TwipsPerPixelY) - 3
DrawFocusRect UserControl.hdc, lpRect
UserControl.ScaleMode = 1
End Sub
Does anybody can show me the correct way to draw
the Focus?
Thanks a lot...
Michel Jr.
-
May 24th, 2000, 01:24 AM
#2
Fanatic Member
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
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
|