Hello Santhakumar,
Check out this code taken here (with some modif)
some weeks ago:
' ---
Declare Function WindowFromPoint Lib "user32"
(ByVal xPoint As Long, ByVal yPoint As Long) As Long
Declare Function GetCursorPos Lib "user32"
(lpPoint As POINTAPI) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Function SetCtlOver(ByRef ctlSource As Control) As Boolean
Dim tPos As POINTAPI
Dim lhWnd As Long
lhWnd = GetCursorPos(tPos)
lhWnd = WindowFromPoint(tPos.X, tPos.Y)
If lhWnd = ctlSource.hwnd Then
SetCtlOver = True
Else
SetCtlOver = False
End If
End Function
' ---
Also, check out functions Get/Set/Release Capture...
Hope this helps,
Rejean Cloutier