13-11-15, 12:35 AM
تم الحل الحمد الله
Dim mPos As POINTAPI
Dim PosX As Long
Dim PosY As Long
' The position in picture box you want to click
PosX = 50 ' 50 pix from left
PosY = 100 ' 100 from top
' find X Y of picture box
ScreenToClient(PictureBox1.Handle.ToInt32, mPos)
' move cursor
SetCursorPos(PosX + Abs(mPos.x), PosY + Abs(mPos.y))
'Click
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
Dim mPos As POINTAPI
Dim PosX As Long
Dim PosY As Long
' The position in picture box you want to click
PosX = 50 ' 50 pix from left
PosY = 100 ' 100 from top
' find X Y of picture box
ScreenToClient(PictureBox1.Handle.ToInt32, mPos)
' move cursor
SetCursorPos(PosX + Abs(mPos.x), PosY + Abs(mPos.y))
'Click
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)


