Skillfully use three SplitContainers as an example of a framed page (including the hidden button displayed on the top left side)

Skillfully use three SplitContainers as an example of a framed page (including the hidden button displayed on the top left side)

        '//Maximize the window, set the window to not display borders//----------------------------------- -----------------------------------
        Me.WindowState = FormWindowState.Maximized
        Me.FormBorderStyle = False
        '// Set SplitContainer not resizable -------------------------------------------- --------------------------
        Me.SplitContainer1.IsSplitterFixed = True
        Me.SplitContainer2.IsSplitterFixed = True
        Me.SplitContainer3.IsSplitterFixed = True
        '// Set the size of SplitContainer1 --------------------------------------------- -------------------------------
        Me.SplitContainer1.Parent.Width = Me.Width 'S1 width
        Me.SplitContainer1.Parent .Height = Me.Height 'S1 height
        '//--------------------------------------------------------- -------------------------------------------------- -----
        Me.SplitContainer1.Panel1MinSize = 200 'The height of the upper menu
        Me.SplitContainer2.Panel1MinSize = 200 'The width of the left menu
        Me.SplitContainer3.Panel1MinSize = 13 'The middle display and hide button panel1 width 
        Me.SplitContainer3.SplitterDistance = 13
        '//Set the coordinates and style of the middle display and hide the left button --------------------------------- ------------------------------
        Button4.Location = New Point(0, Int(Me.SplitContainer2.Panel2.Height / 2 ))
        Button4.FlatStyle = FlatStyle.Flat
        'The FixedPanel values ​​of SplitContainer1, SplitContainer2, and SplitContainer3 must be set to: Panel1-----------------
        Label1.Text = "Top Menu SplitContainer1.panel1:Width" & Label1.Parent.Parent.Width & "*Height:" & SplitContainer1.Panel1.Height
        Label2.Text = "Left Menu SplitContainer2.panel1:Width" & SplitContainer2. Panel1.Width & "*height:" & SplitContainer2.Panel1.Height
        Label3.Text = "Show, hide button SplitContainer3.panel1:width" & SplitContainer3.Panel1.Width & "*height:" & SplitContainer3.Panel1.Height
        Label4. Text = "The content on the right shows SplitContainer3.panel2: Width" & SplitContainer3.Panel2.Width & " * Height:" & SplitContainer3.Panel2.Height
        Label5.Text = "Notes:" & vbCrLf &
       "1, SplitContainer1, The FixedPanel value of SplitContainer2 and SplitContainer3 must be set to: Panel1; "&vbCrLf &
       "2. This program is full screen. If you have other requirements, please modify the code;" & vbCrLf &
       "3. For other codes and settings, please refer to the corresponding code comparison of this program;"



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324822964&siteId=291194637