level 6
'鼠标位置是以Pixel为单位,所以控件的left top width height等属性都要除上 15 Private Declare Fun拿掉ction SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As LongPrivate Sub Command1_Click() SetCursorPos 300,400End Sub'************ 移到窗体的中心Private Declare Fun拿掉ction SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As LongPrivate Sub Command1_Click() SetCursorPos (Me.Left + Me.Width \ 2) \ 15, (Me.Top + Me.Height \ 2) \ 15End Sub
2008年12月04日 14点12分