devxlogo

Make Your Mouse Pointer Tremble

Make Your Mouse Pointer Tremble

To make your mouse pointer appear to be trembling, you first create a form with ScaleMode = 3 – Pixel. Then use the following code:

Option ExplicitPrivate Type POINTAPI    X As Long    Y As LongEnd Type'Windows API functions to set the cursor positionPrivate Declare Function SetCursorPos Lib "User32" (ByVal X As Long,_    ByVal Y As Long) As Long    Private Declare Function ClientToScreen Lib "User32" (ByVal hWnd As_ Long, lpPoint As POINTAPI) As LongDim lpPoint As POINTAPI'To get the mouse position at every momentPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer,_X As Single, Y As Single)    lpPoint.X = X    lpPoint.Y = Y   End SubPrivate Sub Timer_Timer()    If lpPoint.X < Form1.ScaleWidth And lpPoint.Y 

devx-admin

Share the Post: