John,
As Rad suggests, by default the button will adjust to fit the checkbox &
text.
You can control this behavior with the AutoSize property. So to answer your
original question:
>Does vs 2005 have buttons that can have two states i.e. depressed and
normal?
Use a Checkbox with:
Appearance = Button
AutoSize = False
Changing the FlatStyle to Flat you can use the FlatAppearance property to
control the colors used by the button. For example, a Green "toggle" button:
Me.CheckBox1.Appearance = System.Windows.Forms.Appearance.Button
Me.CheckBox1.BackColor = System.Drawing.Color.LightGreen
Me.CheckBox1.FlatAppearance.BorderColor = System.Drawing.Color.Green
Me.CheckBox1.FlatAppearance.CheckedBackColor =
System.Drawing.Color.Green
Me.CheckBox1.FlatAppearance.MouseDownBackColor =
System.Drawing.Color.DarkGreen
Me.CheckBox1.FlatAppearance.MouseOverBackColor =
System.Drawing.Color.PaleGreen
Me.CheckBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
FWIW: A number of controls gained the AutoSize property in .NET 2.0, if a
control is not resizing for you check for this property.
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"John" <Jo**@nospam.infovis.co.ukwrote in message
news:eG**************@TK2MSFTNGP03.phx.gbl...
Thanks but can't work out how to make its size to what I need. No handles
to make it bigger. Manually setting the size in properties does not work
either.
Thanks
Regards
"Mattias Sjögren" <ma********************@mvps.orgwrote in message
news:OA**************@TK2MSFTNGP03.phx.gbl...
>Does vs 2005 have buttons that can have two states i.e. depressed and
normal?
You can use the CheckBox control with the Appearance property set to
Button.
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.