Windows Form on All Resolution

Abraham_c_k

New member
Joined
Dec 15, 2005
Messages
1
Programming Experience
3-5
Hi Everybody,

Can Somebody help me out with this.

I Want to create a windows form which will show up nicely on any resolutions. Suggestions Please!..

Thanks
Abraham
 
Resolution shouldn't be an issue. Your form is still the same number of pixels wide and the same number of pixels high regardless of the resolution of the monitor on which it is being displayed. If your form is resizable you should surely have already taken care of making the form appear correctly when it is resized. If it's not resizable then it's not an issue. If you aren't aware, you use the Anchor property to ensure controls remain in the same position relative to their container.
 
actually there is a difference, i recently ran a program of mine on a widescreen moniter and it was totally messed up, the form was cutting controls in half (on the right hand side of the form) and the bottom half was cut off as well

mind you this runs perfectly fine on normal monitors, widescreen lcd's are not cool
 
I have two monitors: one wide-screen and one not. I've never had an issue with any window on either one, even when changing the wide-screen from landscape to portrait and back. As long as you have a wide-screen monitor set to a resolution such that each pixel has the same height as it has width there is no logical reason to believe that there would be an issue. If you have a regular monitor running at 1280 x 1024 and then you move to a wide-screen that simply has a few hundred extra pixels horizontally, what reason could there be for your form to be affected? If there is an issue with the video driver then perhaps, but there is no other reason that I can think of.
 
that's what i thought, but i have a non-wide screen lcd (1600x1200) and a 17" crt (1280x1024) that run the app just fine

my dell laptop widescreen (1440 x 900) and my hp laptop widescreen (1280 x 800) cut the right side and the bottom off

i dont get it
 
JuggaloBrotha said:
that's what i thought, but i have a non-wide screen lcd (1600x1200) and a 17" crt (1280x1024) that run the app just fine

my dell laptop widescreen (1440 x 900) and my hp laptop widescreen (1280 x 800) cut the right side and the bottom off

i dont get it
That sounds more like an issue with the position of the form rather than size or relative dimensions. If you can move your form such that it is all on screen and it doesn't look stretched in either direction then it's a case of the positioning being screwed up. I can't say why that would be happening, especially to the right-hand side, but it doesn't actually affect how the form looks at those resolutions. How are you setting the Size and Location of the form in that app?
 
the size and location is set in the designer
location: CenterScreen
size: 345x250

all systems resolutions are higher than 1024x768 so the form (being shown CenterScreen) isnt just off to the edge of the screen
it could be a bug in the framework i guess, though it's extremely doubtful
 
Create a Resolution Independent Form

AS I understand I Think U want to make an resolution free form

SO can have this code as Form)Resize event .

Private Sub Form_Resize()
If Me.Width >= (800 * Screen.TwipsPerPixelX) Then
Me.Width = (800 * Screen.TwipsPerPixelX)
End If
If Me.Height >= (600 * Screen.TwipsPerPixelY) Then
Me.Height = (600 * Screen.TwipsPerPixelY)
End If
End Sub

But It constrains the form to the equivalent of 800 x 600.

Hope this helps
 
Back
Top