How to size the form onOpen

  • Thread starter Ernesto Herrera Jr.
  • Start date
E

Ernesto Herrera Jr.

Hi,
I would like to open the form with the maximum amount of screen available
without setting it to maximized.
In other words, I would need to know what is the resolution of the screen to
properly resize the window to fill the screen.
I was thinking in using the win32 api "GetDeviceCaps" and figure the
resolution this way.
Is there another way to do it with the .NET FRAMEWORK?

Thank you,
Ernesto
 
H

Herfried K. Wagner [MVP]

Hello,

Ernesto Herrera Jr. said:
I would like to open the form with the maximum amount
of screen available without setting it to maximized.
In other words, I would need to know what is the
resolution of the screen to properly resize the window to
fill the screen.

SystemInformation.PrimaryMonitorSize
SystemInformation.WorkingArea
SystemInformation.VirtualScreen
Screen.PrimaryScreen.Bounds
Screen.PrimaryScreen.WorkingArea

When using multiple monitors:

Screen.AllScreens

HTH,
Herfried K. Wagner
 
E

Ernesto Herrera Jr.

Thank you,
Ernesto

Herfried K. Wagner said:
Hello,



SystemInformation.PrimaryMonitorSize
SystemInformation.WorkingArea
SystemInformation.VirtualScreen
Screen.PrimaryScreen.Bounds
Screen.PrimaryScreen.WorkingArea

When using multiple monitors:

Screen.AllScreens

HTH,
Herfried K. Wagner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top