--- MDI Forms and Multi-Form Programming - Objective: To implement multi-form examples in the MDI form, displaying form general code in VB.NET is as follows
Private
Sub Toolbar1_ButtonClick ()
Sub ToolBar1_ButtonClick (ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick Select Case e.Button.Text Case "OK" ' "OK" is ToolBarButton.Text Dim fr As New frmName fr .Mdiparent = me 'me is mdiform fr.show () end select end SUB
http://www.chinaaspx.com/club/topic_5_7796.htm
Refer to it, get the following code
Private
Shared
FR
AS
New
FRMNAME
Private
Sub Toolbar1_ButtonClick ()
Sub ToolBar1_ButtonClick (ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick Select Case e.Button.Text Case "OK" ' "OK" is ToolBarButton.Text If fr Is Nothing Or fr .Isdisposed the fr = new fmname fr.mdiparent = me fr.show () else fr.mdiparent = me fr.show () fr.focus () end if End SELECT END SUB
This way, the form is a form ~ --- end ---