A good beginning is the first step to success ——— build a program

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.