QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: krovit on July 23, 2021, 07:47:19 am
-
I am one who always asks and contributes little to this beautiful and patient community... Sorry
There is a way to send a window in one monitor rather than another ?
I have 3 monitors and the execution seems random on one rather than another, with slight preference for the main.
-
Hello again, @krovit ! There is a way to do this with SCREENMOVE. You can make the program move to different monitors that way. If you plan on distributing it, though, then you might want to use WinAPI to find how many monitors there are before doing that. I know the function set for this but will need time as I'm super busy lately.
-
Thanks again for your availability.
QB64 is really flexible!
There is a whole world to discover around the WinAPI.
I have "only" to understand the C++ and then understand how to convert the scripts in C ++ in BAS, as you did.
In short... little things ;)
Screenmove I use it regularly but I was able to manage only the screen where the window appears.
In the wiki I do not seem to have found anything that would help me in the choice of the display.
Anyway, especially if you are busy, do it calmly: you and others already give a nice service.
The request is always valid.
-
You might try _SCREENMOVE -1200,0, for example.
If your main monitor is to the right of your second monitor, I have seen cases where the second monitor is assigned negative coordinates.
For example:
Left Monitor (-1281 to -1, 0 to 720)
Right Monitor (0 to 1280, 0 to 720)
(Assuming both monitors are in a 1280x720 display mode.)
I’ve currently got 2 monitors and an old TV hooked to my main pc, and that’s how their coordinates are set up. Left is negative, Middle starts at 0, and the Tv is +that.
-
Hi SMcNeill,
In the past I had tried to exploit the negative value as you suggest and on various occasions and I had seen that it worked.
Unfortunately I had to give up the system because the window management was problematic anyway.
For an efficient system it is necessary to know how many displays there are, which is the main one and then manage them.
It's a useful thing: almost everyone, especially in the workplace, has two or three monitors connected.
-
There's some WinAPI for this as well. I'll have to sit down and look at it.