Reputation: 23295
In a legacy product we used Sheridan controls to produce buttons that looked like this:
Is this style of button available in C# using VS2005?
Upvotes: 2
Views: 2156
Reputation: 668
If you want the buttons exactly like that have you considered using images for the buttons? That way you just simply take an image of that style and make it into a button. You get all the functionality of a button but you also get it to look like you want it to.
Upvotes: 0
Reputation: 942358
The way buttons looked over the history of GUI development was affected heavily by machine capabilities. It all started with simple rectangles back in the late eighties, back when operating systems were 16-bit and video adapters could display only 16 colors. The 3-D style became vogue in the nineties, Sheridan was an early pioneer and was widely copied. Threed.ocx was a Microsoft library to get this styling. Empowered by video adapters being capable of 256 colors and enough horse power to draw the beveled edges. Some remnants of it persist in Winforms through the BorderStyle property.
By the time Winforms started, early 2000's, video adapters could display 16 million colors and elaborate gradients became the vogue. Clearly visible in the default style of a Winforms button as well as controls like ToolStrip and StatusBar. And Windows visual style themes. A significant disadvantage of this styling is that it cannot easily be overridden. Winforms has four distinct button renderers (note the FlatStyle property), they are all private classes that cannot be overridden. They are too elaborate to easily expose.
This has gone full circle, we are now back to simple flat rectangles. Very noticeable in the default styling for WPF buttons and the Metro theme in Windows 8. No longer affected by machine capabilities but (possibly) the limitations of CSS, the language used to give web pages their styling. Winforms supports it too through the FlatStyle and FlatAppearance properties.
Trying to resurrect the 3-D style is not so easy, you'll have to create a custom button control from scratch with ButtonBase as the base class. And override OnPaint() to draw the button the way you want it. It is pretty questionable whether you should even try, the 3-D style is definitely out of vogue and too strongly associated with old programs that stopped being maintained. Not the kind of association you'll want in a new program.
Upvotes: 7