How To Check Whether Dialog Size Is Bigger Than Screen Size

How To Check Whether Dialog Size Is Bigger Than Screen Size

Postby acwoo1 » Tue Jul 03, 2012 9:24 am

Hi

How to check whether a user has selected a dialog box bigger than the monitor screen size.

Regards
ACWoo
acwoo1
 
Posts: 161
Joined: Tue Nov 10, 2009 10:56 am

Re: How To Check Whether Dialog Size Is Bigger Than Screen Size

Postby Marc Vanzegbroeck » Tue Jul 03, 2012 9:59 am

Hi,

You can check the dialog-size with oDlg:nWidth and oDlg:nheight
The screen-dimensions can be retreived by the getsysmetrics() function.

Regads,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: How To Check Whether Dialog Size Is Bigger Than Screen Size

Postby Bayron » Tue Jul 03, 2012 10:23 am

It may be something like:

Code: Select all  Expand view
If oDlg:nWidth > WndWidth( GetDesktopWindow() ) .or. oDlg:nHeight > WndHeight( GetDesktopWindow() )
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: How To Check Whether Dialog Size Is Bigger Than Screen Size

Postby ukoenig » Tue Jul 03, 2012 10:50 am

For the dialog-size, You need a small adjustment ( Dialog-style ),
because the frame is not included in oDlg:nWidth and oDlg:nHeight => :

Testing with sreen 1024 x 768
Dialog with title and border Dialog = Screensize

DEFINE DIALOG oDlg2 FROM 0, 0 TO 768 -28, 1024 -8 PIXEL

ACTIVATE DIALOG oDlg2 ;
ON INIT ( Msgalert( GetSysmetrics( 0 ), "Screen-width (1024)"), ;
Msgalert( GetSysmetrics( 1 ), "Screen-height (768)"), ;
Msgalert( oDlg2:nWidth, "Dialog-width"), ;
Msgalert( oDlg2:nHeight, "Dialog-height") )


Best Regards
Uwe :lol:
Last edited by ukoenig on Tue Jul 03, 2012 2:41 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: How To Check Whether Dialog Size Is Bigger Than Screen Size

Postby acwoo1 » Tue Jul 03, 2012 2:40 pm

Hi

Thanks a lot

Regards

ACWoo
acwoo1
 
Posts: 161
Joined: Tue Nov 10, 2009 10:56 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 126 guests

cron