[vb.net] on multiple forms programming of MDI Forms
Source: Internet
Author: User
Programming---MDI Forms and multiple form programming---Purpose: to implement an instance of multiple forms with toolbar in the MDI window, and to display the form as a general code in vb.net
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
For reference, draw 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 Then
FR = New Frmname
Fr. MdiParent = Me
Fr. Show ()
Else
Fr. MdiParent = Me
Fr. Show ()
Fr. Focus ()
End If
End Select
End Sub
This is an instance of the form ~---end---
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.