Some common properties of forms in WinForm

Source: Internet
Author: User

Common form Properties for WinForm forms

1) Form full screen display

This.  Desktopbounds = Screen.getworkingarea (this); Full Screen display desktop

Note: Can be placed in the initialization method, you can also set the timer (timer), when to display full screen

2) Remove minimize and maximize form

This.   MinimizeBox = false; True is minimized by default, False is the opposite
This. MaximizeBox = false;

3) Set as top-level form

This.   topmost = true; Overwrite a form that was previously lower than it

4) Disable resizing of the form manually

This. AutoSizeMode = Autosizemode.growandshrink; Disables manual resizing of the form.

Note: Typically used in initialization methods

5) Border style of the form

This. FormBorderStyle = FormBorderStyle.Fixed3D; Specify the border style for a form

6) Set the transparency of the form

This.  Opacity = 0.5; Value is between 0-1

7) Hide the title bar of the form

This. FormBorderStyle = Formborderstyle.none;

Some common properties of forms in WinForm

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.