Michel Jr
May 3rd, 2000, 03:38 AM
Hello,
I'm developing an OCX like an IE Button.
When the mouse is over the button, I draw the borders.
When the mouse leaves the button, I erase the borders.
I'm using SetCapture (hwnd) and ReleaseCapture, but
when I click on the Label1 nothing happens. I think there
is a conflict between SetCapture/ReleaseCapture and the
Click() event.
My OCX just has a label (Called Label1) inside it.
Private Sub UserControl_MouseMove(Button As Integer, Shift
As Integer, X As Single, Y As Single)
RaiseEvent MouseMove(Button, Shift, X, Y)
wMouseEnter = (0 <= X) And (X <= UserControl.Width) And
(0 <= Y) And (Y <= UserControl.Height)
If wMouseEnter Then
SetCapture (hWnd)
Call DrawBorders 'Routine do draw the borders of
' the control
Else
ReleaseCapture
Call EraseBorders 'Routine do draw the borders
'of the control
End If
End Sub
Private Sub UserControl_Click()
RaiseEvent Click
End Sub
Private Sub Label1_Click()
RaiseEvent Click
End Sub
Anybody knows how can I solve this?
Thanks for any help.
Michel Jr.
I'm developing an OCX like an IE Button.
When the mouse is over the button, I draw the borders.
When the mouse leaves the button, I erase the borders.
I'm using SetCapture (hwnd) and ReleaseCapture, but
when I click on the Label1 nothing happens. I think there
is a conflict between SetCapture/ReleaseCapture and the
Click() event.
My OCX just has a label (Called Label1) inside it.
Private Sub UserControl_MouseMove(Button As Integer, Shift
As Integer, X As Single, Y As Single)
RaiseEvent MouseMove(Button, Shift, X, Y)
wMouseEnter = (0 <= X) And (X <= UserControl.Width) And
(0 <= Y) And (Y <= UserControl.Height)
If wMouseEnter Then
SetCapture (hWnd)
Call DrawBorders 'Routine do draw the borders of
' the control
Else
ReleaseCapture
Call EraseBorders 'Routine do draw the borders
'of the control
End If
End Sub
Private Sub UserControl_Click()
RaiseEvent Click
End Sub
Private Sub Label1_Click()
RaiseEvent Click
End Sub
Anybody knows how can I solve this?
Thanks for any help.
Michel Jr.