Get resolution of display for stack

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
bergsy
Posts: 45
Joined: Mon Oct 28, 2013 10:51 pm

Get resolution of display for stack

Post by bergsy » Thu Jun 23, 2016 3:17 am

Hi,

I want to be able to determine the resolution of the display on which ]my stack resides (it could be on one of two physical screens.

I have looked at screenrect however it doesn't seem to match the resolutions of my screens (main display is 2160 x 1440 and the second is 1920 x 1080). When my stack is on the second screen, screenrects gives me the following two lines:

0,0,1440,960
1440,0,2720,720

The loc of my stack is 2593,478

As you can see, screenrects doesn't match the resolution of either of my displays

Not sure what I am doing wrong

Any suggestions would be greatly appreciated

Cheers

Greg

Ormente
Posts: 28
Joined: Wed Nov 12, 2014 7:47 pm

Re: Get resolution of display for stack

Post by Ormente » Thu Jun 23, 2016 8:22 am

Hi Greg,

I suspect those are the physical pixel size of your screens, but maybe not the size set for display at the graphic card level.
Maybe you can try to set the rect of your stack to the value you get and see if that give you a fullscreen.

Once you have the screenrects, you can use the screen of stack "myStack" to get the number of the screen your stack is on.

Post Reply