📜  检查表单是否打开 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:03.828000             🧑  作者: Mango

代码示例1
Imports System.Linq ' need to add 


If Application.OpenForms().OfType(Of Form2).Any Then
  MessageBox.Show("Opened")
Else
  Dim f2 As New Form2
  f2.Text = "form2"
  f2.Show()
End If