Click here to Skip to main content
14,271,804 members
Rate this:
Please Sign up or sign in to 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
Rate this:
Please Sign up or sign in to vote.

Solution 2

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.
   
Comments
Sergey Alexandrovich Kryukov 17-Jan-12 23:39pm
   
Exactly! A 5.
--SA
Rate this:
Please Sign up or sign in to vote.

Solution 3

Agreed with OriginalGriff and Dave Kreskowiak.

but only for your your learning purpose go through these-

Dynamic Screen Resolution[^]

VB.Net change screen resolution[^]
   
Comments
Sergey Alexandrovich Kryukov 17-Jan-12 23:39pm
   
Well, if just for learning -- a 5 :-)
--SA
Rate this:
Please Sign up or sign in to vote.

Solution 1

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...
   

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




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