我只是尝试使用“Exercise.show()”打开一个新表单,因为它到目前为止一直有效,但是对于这个练习表单,它没有显示为表单的选项,所以我无法打开它。我应该在这里做什么?
Private Sub Exercises_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Exercises.Click
Exercises.Show()
Me.Hide()
End Sub
我只是尝试使用“Exercise.show()”打开一个新表单,因为它到目前为止一直有效,但是对于这个练习表单,它没有显示为表单的选项,所以我无法打开它。我应该在这里做什么?
Private Sub Exercises_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Exercises.Click
Exercises.Show()
Me.Hide()
End Sub
尝试这个:
Dim oForm As Exercises
oForm = New Exercises()
oForm.Show()
如果您的实际表格称为“练习”,那么您需要输入:
Dim frm As New Exercises frm.ShowDialog()
谢谢
埃迪·贾德
使用 ShowDialog() 更改 .Show
Exercises.ShowDialog()
Dim objPDetails As PFErrors
Dim IsOpen As Boolean = False
For Each f As Form In Application.OpenForms
If f.Name = "PFErrors" Then
IsOpen = True
f.Focus()
Exit For
End If
Next
If IsOpen = False Then
objPDetails = New PFErrors
objPDetails.WindowState = FormWindowState.Maximized
objPDetails.MdiParent = Me
objPDetails.Show()
End If