● -- ●
.■■■ -MDI frmLogin 顯示(使用)方式 :
Dim frmChild As New frmLogin()
frmChild.MdiParent = Me
frmChild.Show()
.■■■ - MDI 檢查是否已存在 Form
'*****************************************************************************
'*參數說明:tMDIChildFormName ——檢測視窗體名稱
'*功能說明:檢測當中有沒有窗體實例,有則激活;沒有則傳回True , 讓呼叫端開啓新窗體
'*****************************************************************************
Private Function CheckFormNotUsed(ByVal tMdiChildFormName As String) As Boolean
For Each childForm As Form In Me.MdiChildren
If childForm.Name = tMdiChildFormName Then
childForm.Visible = True
childForm.Activate()
Return False
End If
Next
Return True
End Function
Private Sub DllSyncToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DllSyncToolStripMenuItem.Click
If CheckFormNotUsed("frmDllSync") Then
Dim mMdiFrm As New frmDllSync
mMdiFrm.MdiParent = Me
mMdiFrm.WindowState = FormWindowState.Maximized
mMdiFrm.Show()
End If
End Sub
.■■■ -
.■■■ -
.■■■ -
.■■■ -
.■■■ -
.■■■ -
-
-
Vb.Net MDI Form Memo
on
0 意見:
張貼留言