Author Topic: Multi Monitor  (Read 3322 times)

0 Members and 1 Guest are viewing this topic.

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
Multi Monitor
« 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.



Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Multi Monitor
« Reply #1 on: July 23, 2021, 07:50:39 am »
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.
Shuwatch!

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
Re: Multi Monitor
« Reply #2 on: July 23, 2021, 10:27:14 am »
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.



Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Multi Monitor
« Reply #3 on: July 23, 2021, 01:12:03 pm »
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.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
Re: Multi Monitor
« Reply #4 on: July 27, 2021, 06:24:37 am »
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.

Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Multi Monitor
« Reply #5 on: July 27, 2021, 07:44:59 am »
There's some WinAPI for this as well. I'll have to sit down and look at it.
Shuwatch!