Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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
Updated 5-Jul-12 6:51am
v2
Comments
Sergey Alexandrovich Kryukov 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 5-Jul-12 12:48pm    
Add the tag "Forms".
--SA
[no name] 5-Jul-12 12:58pm    
This makes no sense at all.
Sergey Alexandrovich Kryukov 5-Jul-12 14:52pm    
Of course, buy I think I can guess what it is; please see my answer.
--SA

1 solution

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
 
Share this answer
 
Comments
Espen Harlinn 5-Jul-12 14:12pm    
5'ed! - as usual :-D
Sergey Alexandrovich Kryukov 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900