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. Visual Basic
  4. Form properties resetting themselves

Form properties resetting themselves

Scheduled Pinned Locked Moved Visual Basic
helpcsharpvisual-studiographics
3 Posts 2 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
    Mark06
    wrote on last edited by
    #1

    Help, Im going insane. Im using VS.Net 2005 and have come across a problem where properties I set dont seem to take affect. For example: I have a vb.net form, I set its size to 330, 500. Save the form. Close and reopen it, and the size has changed to 326, 497. Ive done it 20 times. Even rebooted several times. The form isnt locked. The file is writeable. Infact, the actual size in the designer does even match, in there it says 324, 469. So I manually change that value to 330, 500. Save, close and reopen. Now my form has grown to 332, 528!! Here's what the designer says: Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.Control Me.ClientSize = New System.Drawing.Size(324, 469) As you can see, nothing fancy at all. I changed the colour to bright red. saved, closed, reopened. The form was still bright red. Has anyone ever seen this happen before? Not happening anywhere else, other forms seem to be fine. However it has reminded me of a problem last week, where I had a splitter on a form, which I moved, and later noticed that it had repositioned itself. Im lost. And slowly going crazy! Please help!! Mark

    C 1 Reply Last reply
    0
    • M Mark06

      Help, Im going insane. Im using VS.Net 2005 and have come across a problem where properties I set dont seem to take affect. For example: I have a vb.net form, I set its size to 330, 500. Save the form. Close and reopen it, and the size has changed to 326, 497. Ive done it 20 times. Even rebooted several times. The form isnt locked. The file is writeable. Infact, the actual size in the designer does even match, in there it says 324, 469. So I manually change that value to 330, 500. Save, close and reopen. Now my form has grown to 332, 528!! Here's what the designer says: Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.Control Me.ClientSize = New System.Drawing.Size(324, 469) As you can see, nothing fancy at all. I changed the colour to bright red. saved, closed, reopened. The form was still bright red. Has anyone ever seen this happen before? Not happening anywhere else, other forms seem to be fine. However it has reminded me of a problem last week, where I had a splitter on a form, which I moved, and later noticed that it had repositioned itself. Im lost. And slowly going crazy! Please help!! Mark

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Do you set it in the designer, or in code ? If in code, before or after the initialiseComponent call ?

      M 1 Reply Last reply
      0
      • C Christian Graus

        Do you set it in the designer, or in code ? If in code, before or after the initialiseComponent call ?

        M Offline
        M Offline
        Mark06
        wrote on last edited by
        #3

        No, in designer. Literally just opening a form in designer mode, changing the size in the properties window. Saving and closing. When I reopen it, the size has reverted back.

        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