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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the exact size of the screen? 2

Status
Not open for further replies.

Mandy_crw

Programmer
Jul 23, 2020
585
PH
Hi everyone, as of now my app is put at the middle or my screen… my question is, what is the exact size of a form that should fill the entire screen of the computer? Thanks and God bless.
 
Display width: Sysmetric(1)
Display height: Sysmetric(2)

Intellisense tells you these are screen width and height. Well, in tho loose sense of screen=display, not _SCREEN=screen.

What's less often discussed is that the area you have for your app can be smaller, if the toolbar is shown. There are two symmetric calls that take that into account and give you the size a maximised form will have as Sysmetric(21) and Sysmetric(22).

You can also get more details, take a look at what intellisense options pop up, when you type Sysmetric and the opening bracket.

Chriss
 
Mandy,

If you set the form's WindowState property to 2, then the form will fill the screen. But you will still see the form's title bar and borders. If that's not what you want, you should also set the TitleBar property 0, and the BorderWidth also to 0. But if you do that, make sure you have some way for the user to close the form, because they won't be able to see the built-in Close button.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Yes, Mike raises the point of area taken from the actual form canvas by border and titlebar. SYSMETRIC has entries for these sizes, too.

But then you also have form.ViewportWidth and ViewportHeight.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top