--- About MDI Forms in the With Structure -
In the previous article, an example of the MDI form is introduced.
Http://blog.9cbs.net/allenle/archive/2005/02/18/293122.aspx
Write in the second 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 tobarbutton.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 Today, I commissioned it, using the with structure, the code is as follows