Sempel visual basic code soutrce Mouse Pointer in the middle of control
Sub CenterCursor(hWnd As Long)
Dim rPosition As RECT
#If Win32 Then
Dim X As Long
Dim Y As Long
#Else
Dim X As Integer
Dim Y As Integer
#End If
GetWindowRect hWnd, rPosition
X = (rPosition.right + rPosition.left) / 2
Y = (rPosition.bottom + rPosition.top) / 2
SetCursorPos X, Y
End Sub
CenterCursor hWnd:=Command1.hWnd
Leaving the Mouse Pointer in the middle of control 2
Diposting oleh Source Code Program | 01.19 | visual basic | 0 komentar »
Langganan:
Posting Komentar (Atom)
0 komentar
Posting Komentar