openForm
在数据库中有菜单的表,其中指示了打开的界面。
按钮1 打开 A窗体
但是在VB。NET中如何实现,记得在VBA中可以用 DOCMD.OPENFORM "FormName" 来实现。
寻求各位帮助
[解决办法]
appliaction.run(formname)??
我也不太懂
[解决办法]
show(formname)不就是打开窗体吗?不知道你是不是想要这个?
[解决办法]
Dim frm As FrmDataMana = New FrmDataMana
frm.MdiParent = Me
frm.Show()
[解决办法]
那你就根据combox所选择的内容,然后弹出对应的窗口应该就可以了:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim formname= Me.ComboBox1.SelectedItem
Dim frm As formname
frm = New formname
frm.ShowDialog()
End Sub
[解决办法]
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Dim frm As Form Select Case Me.ComboBox1.Text Case "form1" frm = New Form1 frm.ShowDialog() Case "form2" frm = New Form2 frm.ShowDialog() Case "form3" frm = New Form3 frm.ShowDialog() Case Else End Select End Sub
[解决办法]
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case Me.ComboBox1.Text
Case "form1"
Dim frm As New Form1
Case "form2"
Dim frm As New Form2
Case Else
Dim frm As New Form3
End Select
With frm
.Visible = True
.Show()
.TopMost = True
End With
End Sub