Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. how to make window form control scale with the form

how to make window form control scale with the form

Scheduled Pinned Locked Moved Windows Forms
csharpvisual-studiotutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neodeaths
    wrote on last edited by
    #1

    hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text

    R D J 3 Replies Last reply
    0
    • N neodeaths

      hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text

      R Offline
      R Offline
      Richard Blythe
      wrote on last edited by
      #2

      Scaling is not a very definitive term in this case. You need to describe what each child control is. Is this for "zomming" graphics of some sort? If so, read up on the PictureBox functionality.

      Be nice to your kids. They'll choose your nursing home.
      My Articles   Developer's Best Friend

      1 Reply Last reply
      0
      • N neodeaths

        hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        If it is just increase in the size of controls, proper anchoring/docking would do. You can use the TableLayoutPanel, it makes life easier. For the text, you will have to redraw it using the methods in the Graphics class. You will need to use MeasureString and DrawString methods.

        1 Reply Last reply
        0
        • N neodeaths

          hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text

          J Offline
          J Offline
          johannesnestler
          wrote on last edited by
          #4

          Ok, others said what you have to do (doking, manual resizing of the fonts and graphics, etc.) What comes to my mind, when I hear such a requirement is: Is this really what you should do? How many applications have you seen behaving like that (no dynamic layout but real resizing of a static layout)? And if this is real necessary (because you are writing an app for visually impaired, or whatever) you are maybe using the wrong platform. (e.g Scaling is very simple to do with WPF/Silverlight)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups