关于mysql:错误BC30456’Form’不是’Windows’的成员

Error BC30456 'Form' is not a member of 'Windows'

private子按钮1_click(byval sender as system.object,byval e as system.eventargs)处理按钮1。单击

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    With OpenFileDialog1
        .FileName = String.Empty
        .InitialDirectory ="C:"
        .Title ="Open Excel File"
        .Filter ="Excel 97-2003|*.xls|Excel 2007|*.xlsx"
    End With
    Dim result As DialogResult = OpenFileDialog1.ShowDialog()
    If result = Windows.Form.DialogResult.OK Then
        Try
            TextBox1.Text = OpenFileDialog1.FileName
            GetExcelSheetNames(TextBox1.Text)
        Catch ex As Exception
            MsgBox("Error :" & ex.Message)
        End Try
    End If

End Sub


1
2
3
4
5
6
7
8
9
10
Public Class Form1
    Private loginLabel As String

    Public Sub New(ByVal loginParameter As String)
         InitializeComponent()

         Me.loginLabel = loginParameter

    End Sub
End Class

在您的登录表单中:

1
dim frm as new Form1(label.Text)