Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 Forms WinForm
Hi,
i am developing a windows application using .net 4.0 c# and my problem is i can't able to set full screen in any dekstop resolution.
if i set window state to maximize then form goes to maximize but it's control not set and they look like unmanaged.
kindly suggest me .....


thankyou
Posted 5-Jul-12 7:46am
Edited 5-Jul-12 7:51am
v2
Comments
Sergey Alexandrovich Kryukov at 5-Jul-12 12:47pm
   
How a control can "look like unmanaged"? What do you mean by "unmanaged"? It does not make any sense.
--SA
Sergey Alexandrovich Kryukov at 5-Jul-12 12:48pm
   
Add the tag "Forms".
--SA
Wes Aday at 5-Jul-12 12:58pm
   
This makes no sense at all.
Sergey Alexandrovich Kryukov at 5-Jul-12 14:52pm
   
Of course, buy I think I can guess what it is; please see my answer.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The question is not formulated correctly (please see my comment to the question); I can just guess what do you mean.

You need to develop a decent form layout. No absolute positioning anymore; everything should be based on nested panels, the panels and all other controls should be docked using the property System.Windows.Forms.Control.Dock and System.Windows.Forms.Control.Padding, set appropriate MinimumSize and MaximumSize for the forms, etc.
Please see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx[^].

Sometime you can also adjust layout during run time by overriding one or more of the virtual methods like OnClientSizeChanged, OnSizeChanged, OnResize, OnResizeBegin, OnResizeEnd, but usually, if layout is simple enough and correct, it won't be necessary.

Please see my past answers:
Zom Out malfunctions when Screen resolution changes[^],
how to dock button so that it can adjust with the form[^] (will find a rudimentary code sample here).

See also:
GUI Apperance - C#.Net[^].

—SA
  Permalink  
Comments
Espen Harlinn at 5-Jul-12 14:12pm
   
5'ed! - as usual :-D
Sergey Alexandrovich Kryukov at 5-Jul-12 14:52pm
   
Thank you, Espen.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 144
1 Sascha Lefévre 100
2 Maciej Los 94
3 Abhinav S 84
4 OriginalGriff 80
0 Sergey Alexandrovich Kryukov 6,578
1 OriginalGriff 6,298
2 Peter Leow 2,534
3 Abhinav S 2,358
4 Maciej Los 2,352


Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 5 Jul 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100