08-18-2023, 03:19 PM
Thanks Steve, I'll take a look at these examples.
Detect when mouse leaves program window
|
08-18-2023, 03:19 PM
Thanks Steve, I'll take a look at these examples.
09-09-2023, 01:36 PM
Hi Terry,
I have thought a snippet all in QB64 code... but it seems that I have fallen in an issue about _MOUSEMOVEMENTX/Y These functions seem to loose some data while they are running. Here the snippet in QB64 that looses data during the run! Code: (Select All) Rem the goal: we want to detect if mouse is out or in window's area moving to left and to right the mouse cursor we calculate its position on the global screen... but after some attempts you can see that the position is quite different at any attempt. This can be possible only if _MOUSEMOVEMENTX/Y check position of mouse each tick bigger than that used by _mouseinput. what do you think about this?
09-10-2023, 12:28 AM
Try putting `WHILE _MOUSEINPUT`: ... `WEND`
Inside inner loop, have tight mouse loop.
09-10-2023, 10:41 PM
(09-10-2023, 12:28 AM)grymmjack Wrote: Try putting `WHILE _MOUSEINPUT`: ... `WEND` Hi grymmjack, thank for suggestion. I have done different attempts but they haven't solved the issue. Code: (Select All) Rem the goal: we wanto to detect if mouse is out o in window's area I have evaluated different ways to calculate and adjourn the position o f mouse with the saame results. I have used also your suggeston but I arrived at the the same point. I'm going to do a study code of _MousemovementX & _mousemovemeentY.
09-26-2023, 10:06 PM
here the link to my pure QB64 solution.
It works but it must be improved a little. detecting mouse leaving window's area.
09-27-2023, 05:31 AM
Here's my solution for this (for Windows, at least): https://qb64phoenix.com/forum/showthread.php?tid=2041
|
« Next Oldest | Next Newest »
|