gpt4 book ai didi

mysql - 错误 BC30456 'Form' 不是 'Windows' 的成员

转载 作者:太空宇宙 更新时间:2023-11-03 11:43:10 26 4
gpt4 key购买 nike

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

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

最佳答案

Public Class Form1
Private loginLabel As String

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

Me.loginLabel = loginParameter

End Sub
End Class

在您的登录表单中:

dim frm as new Form1(label.Text)

关于mysql - 错误 BC30456 'Form' 不是 'Windows' 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40423741/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com