Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Nov 14, 2019 9:18 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Window position and remote desktop
PostPosted: Tue Jan 25, 2011 9:58 pm 
Offline

Joined: Mon Jun 23, 2008 3:04 pm
Posts: 121
I have an app that remembers the windows's screen position.
If a user logs in via remote desktop and they now have a different screen resolution (from the last save of the window position) and they start this app the window can end up off the screen.

Does anyone have code to deal with this situation?


Top
 Profile  
Reply with quote  
 Post subject: Re: Window position and remote desktop
PostPosted: Fri Jan 28, 2011 2:37 am 
Offline
User avatar

Joined: Tue Jan 04, 2011 3:02 am
Posts: 1236
Location: Jönköping, Sweden
In your method for reading the window position. When your app knows where to place the window, have it check it agains the current screen Width, height to see if it's greater than what's available.
use screen(x).Width and screen(x).Height
x=screen number (0=main screen)

if wleft > screen(0).width then
wleft = screen(0).width - Window1.width
end if

if wtop > screen(0).height then
wtop = screen(0).height - Window1.height
end if

Window1.Height = wtop
Window1.Width = wleft

Havn't tried this myself so I might be off a bit ;)

_________________
Image http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
Xojo Pro 2013r1


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group