Changing the size of components (VB.Net)

size , visual basic .net , vb , .net Belgium
  • 12 years ago
    I'm looking for something that can change the size of my form. At first it may look simple but what I need is the following: I have 3 menu options: Small, Medium and Large. Clicking one of these has to change the size of the form, buttons, textfield, etc.. and the font size of their text. Any thoughts on how I can implement this?
  • 12 years ago
    There is more options to do this - you can play with scale of form Select Case Me.ListBox1.SelectedIndex Case 0 : Me.Scale(New SizeF(0.5, 0.5)) Case 1 : Me.Scale(New SizeF(2, 2)) Case Else : Me.Scale(New SizeF(5, 5)) End Select You can also properly set all Anchors and Docks of container controls (Form, Panel, GroupBox), in order, if manually resized, it preserves well topology of inside controls. Then you only modify size of form, and all groupboxes etc follow their anchor, and similarly nested controls. Then recursively modify font size, and results should be much bettre than Scale...
  • 12 years ago
    That did the trick perfectly, thanks a lot! Arne

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout