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. C#
  4. setting height and width of controls in form

setting height and width of controls in form

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 3 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.
  • M Offline
    M Offline
    mist_psycho
    wrote on last edited by
    #1

    I have a windows form. I set the "window state" property to "maximize". But in this form i have 2 controls: a picture box and a windows media player tool. They are placed side by side. How can i set the height and width of the picture box tool and windows media player tool, so tat their size (width and height)is 1/2 the size of the form, after the form is maximized.... plz help------

    F L 2 Replies Last reply
    0
    • M mist_psycho

      I have a windows form. I set the "window state" property to "maximize". But in this form i have 2 controls: a picture box and a windows media player tool. They are placed side by side. How can i set the height and width of the picture box tool and windows media player tool, so tat their size (width and height)is 1/2 the size of the form, after the form is maximized.... plz help------

      F Offline
      F Offline
      fly904
      wrote on last edited by
      #2

      Ever thought of working for NASA? Because this is ground breaking stuff. Here's a little hint: this.pictureBox1.Width = this.ClientSize.Width / 2; and this.Resize += new EventHandler(ResizeForm); private void ResizeForm(object obj, EventArgs e)

      My failometer is detecting vast quantities of FAIL!

      1 Reply Last reply
      0
      • M mist_psycho

        I have a windows form. I set the "window state" property to "maximize". But in this form i have 2 controls: a picture box and a windows media player tool. They are placed side by side. How can i set the height and width of the picture box tool and windows media player tool, so tat their size (width and height)is 1/2 the size of the form, after the form is maximized.... plz help------

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        A second grade astronaut might consider a TableLayoutPanel, I haven't used it so far. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


        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