Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display popup in lower right screen depending on resolution

Status
Not open for further replies.

koopaboy

MIS
May 3, 2010
13
PH
few days ago i've posted how to make a popup and i forgot to mention that the version 'm using right now is powerbuilder 10.5, but i still managed to make a popup.

My problem is that monitors have different screen resolutions and i would like a way to display my popup in the lower right screen on any type of monitor. In short a popup that adapts to screen resolution and displays in the lower right corner of the screen in any monitor :)
 
This should already be done for you if you use the code:

Code:
environment le_env

// Get screen size from environment
GetEnvironment( le_env )

li_ScreenHt = PixelsToUnits( le_env.ScreenHeight, YPixelsToUnits! )
li_ScreenWid = PixelsToUnits( le_env.ScreenWidth, XPixelsToUnits! )

// open in lower right corner
this.Move( ( li_ScreenWid - this.Width ), ( li_ScreenHt - this.Height ) )

since the screen height and width are determined by the resolution setting.

Matt

"Nature forges everything on the anvil of time"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top