I’m trying to move the mouse cursor to a specific position on a window. (Windows 10)
Iv’e looked through some previous examples and threads (all of which I cant get to work)
I intend to restrict a user from entering a MoviePlayer area (MouseEnter) - so that a movie can play in the player without users being able to stop, full screen, right click etc. - and figure this is a way that might work.
Its a quiz game that is time specific - toilet not possible while playing - no pausing etc
The video is just for the user to watch NOT TO STOP, PAUSE, FULL SCREEN, RIGHT CLICK etc.
Theres no mistreating of users - just trying to get around the user being able to stop the video and having more time to answer the questions.
Tried this in a button action (Windows 10) - Doesn’t seem to do anything Michel - cursor stays where it is.
#if TargetWin32
Declare Function SetCursorPos Lib “user32” (ByVal x As Integer, ByVal y As Integer) As Integer
//==========================================
// Set cursor position to top left of screen
//==========================================
call SetCursorPos(0,0) #endif
Well Im running Windows 10
Xojo 2016 Release 3
I have a window (Window1)
I have a button (PushButton1)
In the buttons action event I have:
#if TargetWin32
Declare Function SetCursorPos Lib “user32” (ByVal x As Integer, ByVal y As Integer) As Integer
//==========================================
// Set cursor position to top left of screen
//==========================================
call SetCursorPos(0,0) #endif
When I run the project and I click the button nothing happens - the cursor doesn’t move
Are you using Preffered Player, Quicktime or Windows Media Player as MoviePlayer type?
Does a right click menu appear when you right click on the MoviePlayer?
Is a movie loaded into the player?
Is Play/Pause available on the right click menu?