Use. Net to write Windows programs.
1. Make the form appear at the specified position at startup
Form1.StartPosition
Manual
CenterScreen
WindowsDefaultLocation (default)
WindowsDefaultBounds
CenterParent
The setting is valid only before the form is started.
2. Set the icon of the form.
Form1.Icon
3. Set the form to become the parent form of multiple child forms
Form1.isMidContainer = true/false (default)
During design, a project can have only one parent form.
4. Specify the maximum and minimum button actions
Form1.ControlBox = true (default)/false // you can specify whether to maximize, minimize, or close a button.
Form1.MaxmizeBox = true (default)/false // Sets whether the maximize button is valid
Form1.MinimizeBox = true (default)/false // Sets whether the minimization button is valid.
If ControlBox = true MaxmizeBox = false MinimizeBox = false and HelpButton = true
You can see a help button next to the close button.
5. If you want to display a normal menu in the form, you need to add the menu control MainMenu.
The form1.Menu option is used to specify the menu to use.
If you want to dynamically load the menu, prepare the MainMenu control to be used, and change the value of form1.Menu at the appropriate time.
To use a shortcut menu, add the ContextMenu control to the form. Specify form1.ContextMenu as the control.
6. Set the transparency of the form.
Form1.Opacity
The value is a percentage in the range of 0 ~ 100%. When it is equal to zero o'clock, the form cannot be hidden. When it is equal to 100%, this form is a normal form.
7. Set whether to display the form in the taskbar
Form1.ShowInTaskbar = true (default)/false
The default value is true. If it is set to false, it disappears from the taskbar. Usually, you can use policyicon to hide the program to the system status bar in the lower right corner of the system.
8. Set whether to display the adjust handle in the lower right corner of the form
Form1.SizeGripStyle = Auto (default)/Show/Hide
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