VB 6.0 - completely freeze mouse in xp/vista

Discussion in 'Programming' started by movvadinesh, Feb 1, 2008.

  1. #1
    ok well first of add a module
    and in the module add this code

    Code:

    Public Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Public Declare Function ClipCursor Lib "user32" _ (lpRect As Any) As Long


    then go to the main form and add a timer
    double click it and add this code


    Code:

    Dim ClipCur As RECT ClipCur.Top = 200 ClipCur.Left = 200 ClipCur.Bottom = 200 ClipCur.Right = 200 Call ClipCursor(ClipCur)

    now this code will freeze your mouse in any windows o/s i have tried includeing xp and vista so have fun
     
    movvadinesh, Feb 1, 2008 IP