Build a well-laid Windows program

Source: Internet
Author: User

1. Menu bar

Types of MenuStrip

MenuItem Menu items
Textbox text box
ComboBoX Combo box
Separato Split Line

There are toolstrip prefixes in front.

2.applaction.exit ()

Exit the entire application, close all forms

3.this. Close ()

Close the current form

Will trigger the FormClosed event and the FormClosing event

4. A toolbar with pictures

Displaystyle Whether to display images and text
Image The image that will be displayed
Imagescaling Adjust image size
Textimagerelation The relative position of the image and the text

5.ToolStrip Toolbar Type

Button: Buttons

Label Label
SplitButton Split button
DropDownButton Drop-down button
Separator Split Line
Comnobox Combo box
Textbox text box
ProgressBar Progress bar

There are toolstrip prefixes in front.

6. radio button RadioButton

Checked: Whether to select

7. Date control DateTimePicker

Value The current date of the control
MaxDate Maximum Date
MinDate Minimum date

8. Group Box: Gropebox

Text: Associated Literals

9. Panels: Panel

Use as a container

10. Tools: Visual Studio "format" menu

Press and hold the CTRL key to select multiple controls

Take the first control as a baseline

You can use anchor (anchor control)

Distance between fixed control and form edge

Hold down the CTRL key to select multiple controls, and then set the Anchor property to select more than one control at a time

Using the dock (docking control)

11.dock Properties

Dock a control to the edge of a form or fill a form

Setting the Dock property of a control is the quickest way when a control needs to fill the entire form

SdI: such as Notepad, word, etc.

MDI: Multi-window applications

such as Excel browser, etc.

Consisting of at least one window

Include top-level frame windows (also called MDI containers) other document windows (also called child windows)

Steps to create an MDI

1 The Ismdiicontainer property of the parent form is set to True

The MdiParent property of the subform is set to the parent form

Attention:

MDI child forms cannot be set with ShowDialog ()

To create a list of subform windows

Sets the Mdiwindowlistitem property of the parent form menu control to be selected as a Window menu item

Build a well-laid Windows 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.