in this picture,I can see: MenuStrip
,??, TextBox
how do I an bar like this that have the enumeration? I hope this clear. Thanks in advance.
If you're talking about the menu bar at the top of the window (just below the caption/title bar, which you should get for free from any Form
object), then that is not a MenuStrip
control.
The MenuStrip
control doesn't use the native Windows menu bar, which means it's going to look very different on Windows Vista and later where the appearance of the standard menu bar was altered to be blue and plasticky. Since MenuStrip
is drawn entirely in C# code, it's going to look permanently cheesy and stick out like a sore thumb.
If you want the standard Windows menu bar, you need to use the old MainMenu
control . This is what everyone used back in the early days of .NET, but it's still available for backwards-compatibility and for people who care about what their apps look like. You'll probably have to add it to the toolbox manually because it's not there by default. Right-click on your toolbox and click "Choose Items", then find MainMenu
in the list of available controls and ensure that it is checked.
As Blorgbeard suggested in the comments, if you're talking about the line numbers and the text editing control, they're not the standard TextBox
control, either. In fact, they're not a standard Windows control at all. That's a custom control designed specifically for editing code, probably Scintilla .
You can find a .NET implementation here: http://scintillanet.codeplex.com/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.