[Solved] 2nd monitor

Everything else that doesn't fall into one of the other PB categories.
k3pto
User
User
Posts: 87
Joined: Sat Jan 17, 2015 5:24 pm

[Solved] 2nd monitor

Post by k3pto »

I can get a movie to display on multiple windows of my main monitor, how can I display it on a 2nd monitor? Should I use a Window, Canvas, Screen or something else? I tried searching the forum and did not find anything that would help.

Using the Desktop functions I was able to implement views on multiple monitors. Thanks for all who submitted a response.
Last edited by k3pto on Sat Aug 10, 2024 1:01 am, edited 1 time in total.
User avatar
jacdelad
Addict
Addict
Posts: 2027
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: 2nd monitor

Post by jacdelad »

Using a canvas or something else has nothing to do with a second, third or whatever monitor.
So, what's your question really about? Where to play a video or how to use a second monitor? The first one has examples in the help and in this forum, for the second one: the coordinates expand to the second monitor, depending on where it is placed (in relation to your main monitor).
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Nituvious
Addict
Addict
Posts: 1030
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: 2nd monitor

Post by Nituvious »

I think I understand your question, found the other topic you made and came back here. I had to look through the help file because terminology isn't universal, but I think what you're wanting is the desktop library

The help file talks about ExamineDesktops(), DesktopX()/DesktopWidth() etc. I assume on window creation you would just use DesktopX()/DesktopY() as the windows coordinates and your own offsets before window creation.
▓▓▓▓▓▒▒▒▒▒░░░░░
BarryG
Addict
Addict
Posts: 4218
Joined: Thu Apr 18, 2019 8:17 am

Re: 2nd monitor

Post by BarryG »

k3pto wrote: Thu Jul 18, 2024 5:04 pmhow can I display it on a 2nd monitor?
Just change the X/Y position of the movie's window (they can be negative). Yep, that easy. :)
k3pto
User
User
Posts: 87
Joined: Sat Jan 17, 2015 5:24 pm

Re: 2nd monitor

Post by k3pto »

Thanks Nituvious and BarryG (again!). That helps.
k3pto
User
User
Posts: 87
Joined: Sat Jan 17, 2015 5:24 pm

Re: 2nd monitor

Post by k3pto »

I have most of the program working now. However, I still have a problem. I have successfully created my main window and a child window within it. How do I now set the focus back to the main window so I can create more gadgets on it? I tried using SetActiveWindow but that does not seem to work.
User avatar
jacdelad
Addict
Addict
Posts: 2027
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: 2nd monitor

Post by jacdelad »

Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Post Reply