WinForm Information Management System Graphic Example

Source: Internet
Author: User
Finish the effect:

Explain:

The main window is an MDI window, the window has child windows, the control in the child window has a tree chart TreeView, a Panel control, a ListView control (which is a ListView in a window), and a Butten control.

Function:

Click the "Employee Management" Panel in the tree chart to display the ListView data

Other features are temporarily not written ...

Main Window Form1

Form properties:

Ismdicontainer=true;

Window can have only one parent window, child windows can no longer be set by ismdicontainer=true, parent window (no nesting allowed)

Background code:

         Form1_Load (              form1_son son =  //Child window object
Son. Text =  son. MdiParent =  son. Dock =       }

Subform: Form1_son

Background code:

Form1_son_panel fpanel=      treeview1_afterselect (   treeView1.SelectedNode.Text = =   Fpanel. TopLevel =; Fpanel. FormBorderStyle = Formborderstyle.none;  Fpanel.parent=this.panel1; (same as 10 lines function)
Fpanel. Show ();   } }

Explain:

TopLevel Property "True/false"

trueto display the form as a top-level window, otherwise false. The default value is true. "Top-level window: no parent window or main window"

Grandson form: Form1_son_panel

Grandson Properties: Formborderstyle=none "Keep content only, borders, etc."


Background code:

1 public static Form1_son_panel FPANEL;//2 3 public Form1_son_panel () 4 {5 InitializeComponent (); 6 7 fpanel= this;//Note 8} 
Related Article

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.