Hi,
How can I lock the mouse ?
Lock the mouse
- karinha
- Posts: 7932
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Lock the mouse
Thank you, Karinha! But that's not what I need. I don't need to hide the cursor, but to prevent it from moving around the screen
- karinha
- Posts: 7932
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Lock the mouse
Maybe:
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25860&p=141453&hilit=ReleaseCapture&sid=eaf3bf51916308e9db5b1dda8ac5f9fe&sid=1edcf429be937672898c1d873ac01dfe#p141453
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=3347&p=14769&hilit=ReleaseCapture&sid=eaf3bf51916308e9db5b1dda8ac5f9fe&sid=1edcf429be937672898c1d873ac01dfe#p14769
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=1378&p=5755&hilit=releasecapture&sid=eaf3bf51916308e9db5b1dda8ac5f9fe&sid=1edcf429be937672898c1d873ac01dfe#p5755
Regards, saludos.
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25860&p=141453&hilit=ReleaseCapture&sid=eaf3bf51916308e9db5b1dda8ac5f9fe&sid=1edcf429be937672898c1d873ac01dfe#p141453
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=3347&p=14769&hilit=ReleaseCapture&sid=eaf3bf51916308e9db5b1dda8ac5f9fe&sid=1edcf429be937672898c1d873ac01dfe#p14769
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=1378&p=5755&hilit=releasecapture&sid=eaf3bf51916308e9db5b1dda8ac5f9fe&sid=1edcf429be937672898c1d873ac01dfe#p5755
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- karinha
- Posts: 7932
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Lock the mouse
Test, please.
Regards, saludos.
Code: Select all | Expand
// \samples\TRAVMOUS.PRG
#Include "FiveWin.ch"
STATIC oWnd, oTimer
FUNCTION Main()
LOCAL oBar, oExit
PUBLIC oTimer
DEFINE WINDOW oWnd TITLE "Lock Mouse - Look This."
DEFINE BUTTONBAR oBar BUTTONSIZE 64, 50 _3DLOOK TOP OF oWnd 2007
DEFINE BUTTON oExit OF oBar NOBORDER GROUP PROMPT "&Exit" ;
FILENAME "..\bitmaps\16x16\Exit.bmp" ;
ACTION( oWnd:End() ) TOOLTIP "Exit this app" TOP
SET MESSAGE OF oWnd TO "Lock Mouse" NOINSET CLOCK DATE KEYBOARD
oTimer := TTimer():New( 5, {|| RRLOCK_MOUSE() }, oWnd )
oTimer:Activate()
SysRefresh()
// Right click
oWnd:bRClicked := {|| RCloseProg() }
ACTIVATE WINDOW oWnd MAXIMIZED
oTimer:End()
RETURN NIL
FUNCTION RCloseProg()
oWnd:End()
RETURN NIL
STATIC FUNCTION RRLOCK_MOUSE()
SetCursorPos( 500, 500 ) // 1000, 1000
RETURN( .T. )
// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: Lock the mouse
Thanks, I'm actually processing :MMove() on the window. Each time the cursor coordinates change, some processing takes time (and the user, at this time, moves the mouse). Thus, synchronization is disrupted. I was hoping to solve this by RUNSLL32.exe mouse, disable But under 10 it doesn't work
- karinha
- Posts: 7932
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Lock the mouse
Example?
It's always easier to get support when you have a simple example of what you want to do and you're not getting it.
Regards, saludos.
It's always easier to get support when you have a simple example of what you want to do and you're not getting it.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: Lock the mouse
In the C language, they suggest disabling the mouse like this
Get the ID mouse from the xinput list
How can this be written in FW ?
Code: Select all | Expand
system("xinput disable ID mouse")
How can this be written in FW ?