build a well-laid Windows program
We all know that real-life menus and tools are essential parts. In the Program menu bar and toolbar is also the core of the program.
1.menu bars and toolbars in Windows
Menu bar (MenuStrip): Main properties: Item------> A collection of items displayed in a menu.
To set the shortcut key mode:
Way one:1. set the menu item's Text property is ( open (&f)).
Mode two: The Shorcartkeys property is set by the menu item .
2. The drawing of the dividing line:
Insert Split Line
Enter a minus sign (-)
3. Toolbars (ToolStrip)
toolbar item Settings picture, first the picture size is controlled by the whole ToolStrip ,
Set the imagescalingsize value to the pixel value of the picture itself
4. set the displaystyle property to ImageAndTextso that the picture and text are displayed simultaneously
textimagerelation The relative position of the image to the text
5.this. Close ();// closes the current form
6. Controls:
Radio Button control: RadioButton
Date control: Datetimerpicker
Group Box: GroupBox
Panels: Panel
7.Anchor and Dock Properties (controls)
Anchor: The pixel value that keeps the position of the control and the edge of the form fixed.
Dock: Dock the control to a part of the form, or fill the entire body.
8. Note:
If the ReadOnly property is set on a TextBox , setting the font foreground color does not work and you must set the BackColor to be Control can be any color outside .
Everyone support!!! Thank you.
A good beginning is the first step to success ——— build a program