I've rewritten a toolbar that sits at the top of the user's screen. It works, but for some reason, though the app consists of just a form with a Fill-Docked ToolStrip, I cannot get it to stay at the size I specify. It's supposed to be the size of the Windows titlebar, as designed in Visual Studio, but as soon as I run it, it's grown in height by five or six pixels. Everything is set rigidly, the Form and ToolStrip are set to AutoSize=FALSE and I've specified the size in pixels the form should be. I cannot work out what is resizing the form at runtime; the ToolStrip is Docked on Fill mode so it should not cause the form to grow. It all looks perfect in the GUI builder, and I copied most of the configuration from the old VB.Net toolbar it will replace. Can anyone help?
Asked
Active
Viewed 334 times
2
-
What happens when the ToolStrip is not docked to fill? – Jake Berger Aug 03 '11 at 15:17
-
@jberger If it's not docked, then the form shows empty space beneath the toolbar. I used a quick fix by making the background transparent, but it still means the form is expanding – Gargravarr Aug 08 '11 at 11:05
-
You said you rewrote it; have you checking in the code to make sure you are not setting any properties on the toolstrip that wind up overriding the settings you apply in the designer? – gangelo Aug 12 '11 at 01:09
2 Answers
1
Just a wild guess, but have you tried changing the AutoScaleMode property of the Form to something other than Font?

ahazzah
- 756
- 1
- 7
- 18
0
Haven't found an answer but I'll make sure this is closed. I turned the form transparent and it accomplished what I needed. Still unsure why the form expanded when run.

Gargravarr
- 635
- 2
- 10
- 18