| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Managed C++ and C++/CLI Discuss Managed C++ and .NET-specific questions related to C++. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do I scale my windows form to be full screen no matter the resolution?
I have a program that when launched always launched maximized. This is exactly what i want. The problem is if the user's resolution is 800x600, parts of the program are off the screen (program window too big for resolution). How do I make so no matter what the screen resolution, my program always looks the same?
|
|
#2
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
Use Screen.PrimaryScreen.Bounds.
This will allow you to dynamically size your form. Regards. |
|
#3
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
best way is to make your program for the minimum resolution... say 800x600 or 1024x768
and use "Anchor Style" property... then you will have the desired view. |
|
#4
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
I wrote the program using 1024x768 resolution. I dont see the Anchor Styles in the properites window. So how would I go about this using either of methods suggested above this post?
|
|
#5
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
System:
rawing::Rectangle screenRectangle = Screen::PrimaryScreen->WorkingArea;this->Size = System: rawing::Size(screenRectangle.Width-10, screenRectangle.Height-10);I used this in my initializecomponents section of my windows forms code. It still did not scale my program to fit the screen at 800x600. Any suggestions? |
|
#6
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
Did you try using Use Screen.PrimaryScreen.Bounds?
Regards. |
|
#7
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
Is that it? Just put the following statement somewhere in my code:
Screen::PrimaryScreen->Bounds; Please let me know! |
|
#8
|
|||
|
|||
|
Re: How do I scale my windows form to be full screen no matter the resolution?
Sorry, it was an assumption of mine that if you were given a method to obtain the desktop resolution, you would be able to use that to scale the form.
Seeing as I have no intimate knowledge of your GUI design and how it should look, I will have to leave that to you. Good luck. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|