VB6 - Disable mouse events

How to Disable mouse events in vb6



Code:
Option Explicit

Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ((X > Text1.Left And X < Text1.Left + Text1.Width) And (Y > Text1.Top And Y < Text1.Top + Text1.Height)) Then _
ReleaseCapture
End Sub

Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
SetCapture Me.hwnd
End Sub

0 comments:

Listen to nirmaln - sakara - playlist audio songs at MusicMazaa.com