-
[This message has been edited by Semen Matusovski (edited February 27, 2000).]
Announcement
Collapse
No announcement yet.
Screen resolution
Collapse
X
-
To get the usable desktop area, use SystemParametersInfo()...
Code:' hDlg, dx & dy are the DDT dialog metric's.... psuedo code follows: DIM Rct as RECT SystemParametersInfo %SPI_GETWORKAREA, 0, BYVAL VARPTR(Rct), 0 ' Now convert the values into DDT units... DIALOG PIXELS hDlg, Rct.nLeft, Rct.nTop TO UNITS Rct.nLeft, Rct.nTop DIALOG PIXELS hDlg, Rct.nRight, Rct.nBottom TO UNITS Rct.nRight, Rct.nBottom ' Now centre the dialog in the true desktop area... DIALOG SET LOC hDlg, Rct.nLeft + (Rct.nRight - Rct.nLeft - dx) / 2, Rct.nTop + (Rct.nBottom - Rct.nTop - dy) / 2
-------------
Lance
PowerBASIC Support
( mailto:[email protected][email protected]</A> )
Leave a comment:
-
Beautiful, thank you!
Working on a setup program, needed the "Normal" setup look for the gradient blue screen..
Scott
-------------
Scott Turchin
Leave a comment:
-
How does one capture what screen resolution the Computer is set to?Code:nScreenWidth = GetSystemMetrics( SM_CXSCREEN ) nScreenHeight = GetSystemMetrics( SM_CYSCREEN)
Leave a comment:
-
Screen resolution
How does one capture what screen resolution the Computer is set to?
This does not appear to return a valid size...
Local wndclass As WndClassEx
GetWindowRect %HWND_DESKTOP, WndRect
Thanks,
-------------
Scott Turchin
Tags: None
Leave a comment: