Community discussion forum

Changing the size of components (VB.Net)

  • 11 months 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?
    Post was edited on 13/12/2008 12:55:28 Report abuse
  • 11 months 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...
  • 11 months 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).

We'd love to hear what you think! Submit ideas or give us feedback