Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
need code for automatically changes screen resolution
i.e;any application that is developed in vb.net should automatically change its resolution accordingly and also all controls should automatically fit in it accordingly.
Posted
Comments
Sergey Alexandrovich Kryukov 17-Jan-12 23:38pm    
Why?!
--SA

If your application is changing the screen resolution, it's doing something VERY VERY BAD. Changing the resolution will result in the users Desktop icons being rearranged against his/her will and will interfere with other applications the user may be running at the same time.

Windows is a shared system and your application must respect that. You can NOT go changing the screen resolution just because your application doesn't scale well to various resolutions and DPI's.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-Jan-12 23:39pm    
Exactly! A 5.
--SA
Agreed with OriginalGriff and Dave Kreskowiak.

but only for your your learning purpose go through these-

Dynamic Screen Resolution[^]

VB.Net change screen resolution[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-Jan-12 23:39pm    
Well, if just for learning -- a 5 :-)
--SA
There is no such code - it is extremely difficult to do in WinForms - think about it, you have to resize every control, and every control's text font to fit. Generally, not worth the effort. Pick a size, and stick with it.

Alternatively, you could use WPF, which copes very nicely with this kind of thing. Big learning curve, though...
 
Share this answer
 

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