0

我只是尝试使用“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
4

4 回答 4

1

尝试这个:

Dim oForm As Exercises
oForm = New Exercises()
oForm.Show()
于 2013-03-28T11:55:19.313 回答
1

如果您的实际表格称为“练习”,那么您需要输入:

    Dim frm As New Exercises        
    frm.ShowDialog()

谢谢

埃迪·贾德

于 2014-01-13T12:33:28.490 回答
0

使用 ShowDialog() 更改 .Show

Exercises.ShowDialog()
于 2013-03-28T13:28:07.143 回答
0
    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
于 2013-10-01T08:41:49.860 回答