FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How To Check Whether Dialog Size Is Bigger Than Screen Size
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
How To Check Whether Dialog Size Is Bigger Than Screen Size
Posted: Tue Jul 03, 2012 09:24 AM

Hi

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

Regards
ACWoo

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: How To Check Whether Dialog Size Is Bigger Than Screen Size
Posted: Tue Jul 03, 2012 09: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
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: How To Check Whether Dialog Size Is Bigger Than Screen Size
Posted: Tue Jul 03, 2012 10:23 AM
It may be something like:

Code (fw): Select all Collapse
If oDlg:nWidth > WndWidth( GetDesktopWindow() ) .or. oDlg:nHeight > WndHeight( GetDesktopWindow() )

=====>

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

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How To Check Whether Dialog Size Is Bigger Than Screen Size
Posted: 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 :-)
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.
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How To Check Whether Dialog Size Is Bigger Than Screen Size
Posted: Tue Jul 03, 2012 02:40 PM

Hi

Thanks a lot

Regards

ACWoo

Continue the discussion