[VB.NET] Talking about Multi-Dimming Programming of MDI Forms

xiaoxiao2021-03-06  40

--- 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 ---

转载请注明原文地址:https://www.9cbs.com/read-56672.html

New Post(0)