home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 3195
- ClientLeft = 3105
- ClientTop = 2325
- ClientWidth = 4635
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 213
- ScaleMode = 3 'Pixel
- ScaleWidth = 309
- Begin VB.CommandButton Command1
- Caption = "Move Mouse to shape"
- Height = 495
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 1890
- End
- Begin VB.Shape Target
- Height = 345
- Left = 3900
- Shape = 3 'Circle
- Top = 2655
- Width = 540
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Sub MoveMouse(x As Single, y As Single)
- Dim pt As POINTAPI
- pt.x = x
- pt.y = y
- ClientToScreen hwnd, pt
- SetCursorPos pt.x, pt.y
- End Sub
- Private Sub Command1_Click()
- MoveMouse Target.Left + Target.Width / 2, _
- Target.Top + Target.Height / 2
- End Sub
-