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. Small Dialogs - How Small Can I Go ??

Small Dialogs - How Small Can I Go ??

Scheduled Pinned Locked Moved C#
graphicsdebuggingquestionannouncementworkspace
5 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.
  • I Offline
    I Offline
    iltallman
    wrote on last edited by
    #1

    Below is a configuration for a 31x60 dialog I wanted for a small button column which I could load besides my main form. The Height works, but the Width does not go to 31, and although the Debug version says the Form's Width is 31, it still draws something much wider. Is there some minimum width a form can go to? // // Utilities // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(32, 60); this.ControlBox = false; this.Controls.Add(this.btSettings); this.Controls.Add(this.btEvents); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.MaximizeBox = false; this.MaximumSize = new System.Drawing.Size(32, 60); this.MinimizeBox = false; this.Name = "Utilities"; this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Utilities"; this.TopMost = true; this.ResumeLayout(false);

    D R realJSOPR 3 Replies Last reply
    0
    • I iltallman

      Below is a configuration for a 31x60 dialog I wanted for a small button column which I could load besides my main form. The Height works, but the Width does not go to 31, and although the Debug version says the Form's Width is 31, it still draws something much wider. Is there some minimum width a form can go to? // // Utilities // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(32, 60); this.ControlBox = false; this.Controls.Add(this.btSettings); this.Controls.Add(this.btEvents); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.MaximizeBox = false; this.MaximumSize = new System.Drawing.Size(32, 60); this.MinimizeBox = false; this.Name = "Utilities"; this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Utilities"; this.TopMost = true; this.ResumeLayout(false);

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

      Not too sure, but is ClientSize the culprit?

      "Your code will never work, Luc's always will.", Richard MacCutchan[^]

      1 Reply Last reply
      0
      • I iltallman

        Below is a configuration for a 31x60 dialog I wanted for a small button column which I could load besides my main form. The Height works, but the Width does not go to 31, and although the Debug version says the Form's Width is 31, it still draws something much wider. Is there some minimum width a form can go to? // // Utilities // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(32, 60); this.ControlBox = false; this.Controls.Add(this.btSettings); this.Controls.Add(this.btEvents); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.MaximizeBox = false; this.MaximumSize = new System.Drawing.Size(32, 60); this.MinimizeBox = false; this.Name = "Utilities"; this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Utilities"; this.TopMost = true; this.ResumeLayout(false);

        R Offline
        R Offline
        RobCroll
        wrote on last edited by
        #3

        All the property setting you already have plus MinimumSize = 1,1 Why you want to do it though is another question? [edit] I forgot to add that the forms Text value needs to be empty.

        "You get that on the big jobs."

        modified on Monday, February 7, 2011 8:01 AM

        I 1 Reply Last reply
        0
        • I iltallman

          Below is a configuration for a 31x60 dialog I wanted for a small button column which I could load besides my main form. The Height works, but the Width does not go to 31, and although the Debug version says the Form's Width is 31, it still draws something much wider. Is there some minimum width a form can go to? // // Utilities // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(32, 60); this.ControlBox = false; this.Controls.Add(this.btSettings); this.Controls.Add(this.btEvents); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.MaximizeBox = false; this.MaximumSize = new System.Drawing.Size(32, 60); this.MinimizeBox = false; this.Name = "Utilities"; this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Utilities"; this.TopMost = true; this.ResumeLayout(false);

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          Set the MinimumSize property to the same as your MaximumSize property.

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

          1 Reply Last reply
          0
          • R RobCroll

            All the property setting you already have plus MinimumSize = 1,1 Why you want to do it though is another question? [edit] I forgot to add that the forms Text value needs to be empty.

            "You get that on the big jobs."

            modified on Monday, February 7, 2011 8:01 AM

            I Offline
            I Offline
            iltallman
            wrote on last edited by
            #5

            Thanks! It was the Min set to 1,1..I would have guessed the Text.

            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