WinForm (MDI form container, permission settings)

Source: Internet
Author: User

One, MDI form container:

1. Function:

It allows the other form to open inside it and cannot exceed its scope

Set the properties of a form: IsMdiContainer to true-window style

2. Questions:

(1) How do I open the other form inside it?

The name of the form object. MdiParent = this;


(2) How do I maximize properties when I open a form?

Set maximized properties with code before instantiating a Form object, show

Note: The WindowState property of the form must be the default value of normal


(3) The maximum minimum close button is always displayed in the upper right corner of the internal form, how can I remove it?

Place a panel in an MDI form, have the panel stained with all forms, and let the newly opened form open within the panel

The name of the form object. Parent = Panel1;

(4) When the form is maximized, it does not follow the size of the MDI form container

Using the Clinetsizechanged event, in the event, all of the WindowState properties of the open form are reset again


Second, the permission settings:

1, because different user can see the program function is different, then need permission to restrict the user

2. The module code that holds the string type in the database field

3, in the successful login verification, to see if there is a corresponding module code of authority

4, if not, then need to put the corresponding function button hidden

WinForm (MDI form container, permission settings)

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.