?
Solved

Resizing all controls when resizing the Form

Posted on 2014-03-27
13
Medium Priority
?
37 Views
Last Modified: 2016-07-10
In VB6 I used a code that would resize all the controls and font sizes if the Form would be enlarged. Also, when I reduced the size of the Form that same code would resize all controls and font sizes accordinly.
In VB.Net, when I want to resize the Form to enlarge or reduce it, using the "Anchor" property, all the controls and font sizes in the Form do not resize uniformly.
I need a code that will resize all controls and Font sizes according to the size of the Form.
Thank You
0
Comment
Question by:Moshe Singer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
13 Comments
 

Author Comment

by:Moshe Singer
ID: 39959425
in vb6 if i use "For Each ctl In Controls" it is changing all conrols even controls in a TabControl



if vb.net For if i use "Each Ctrl As Control In Controls" it it is changing only conrols thet are NOT in a TabControl
it is changing the size of the TabControl, and not the controls thet in it
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39959495
If that is what you really need you will need to get a third party tool which will handle that. I did a quick search on the web and found this product called Shell MegaPack and you can download a free trial before buying. One of the features is call Resizer component with automatic resizing and resolution-independence which should do what you need.
0
 

Author Comment

by:Moshe Singer
ID: 39959841
I downloaded the the trial version of Shell MegaPack for the Resizer component and it resized the form nicely, but it did not resize the fonts in the Labels that are in a "GroupBox".
Also, a ListBox from Component One C1TrueDBGrid was also not properly resized.\
I need this Resizer component to be reliable for all components of the application.
In VB6, one code took care of everything. Can you please advise.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39960015
As for the fonts you need to use True Type font type because they are scaleable, be aware that when selecting fonts they need to also exist on the users system otherwise another font will replace it . As far as the Component 1 control I do not know. As I stated I searched the web for the link I posted and have no experience with the product.
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39960060
Here is a different product which claims to be even better and to implement the resizing with just one line of code in the forms load event. They also have a 30 day evaluation copy to download.

.Net Forms Resize by Softgroup
0
 

Author Comment

by:Moshe Singer
ID: 39976608
i am still testhing out this resize from http://www.componentsource.com/products/net-forms-resize/index.html

i get an error and wathing for respons from componentsource
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 41694323
Hi angelIII;

The last post I posted is the software I suggested and ToviaSchlesinger was testing. He posted no comment after that. It must have done what he needs.
0
 

Author Comment

by:Moshe Singer
ID: 41701815
i dont have any solotion wow to aut resize a form with all controls on it - in vb.net
can someone provide a solotion on this?
0
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 41701932
You state, "In VB6, one code took care of everything", VB.Net is NOT VB6. Have a look on this Microsoft documentation Automatic Scaling in Windows Forms look at the section Automatic Scaling in Action.
1
 

Author Comment

by:Moshe Singer
ID: 41702006
it looks thet this address
https://msdn.microsoft.com/en-us/library/ms229605(v=vs.110).aspx
is the solotion
thanks a milion
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 41702025
Glad that helped. Please close the question by awarding the solution the points.

Thank you.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question