当我在下拉列表菜单中选择我的项目并将其重定向到我的功能时,我将如何制作?下面是我正在使用 vb.net 的功能,下面是我的下拉菜单列表功能
这就是我的下拉菜单所做的
ddlWafer.Items.Clear()
If txtLot.Text = "A" Then
ddlWafer.Items.Add("123")
ddlWafer.Items.Add("456")
Exit Sub
End If
If txtLot.Text = "B" Then
ddlWafer.Items.Add("789")
ddlWafer.Items.Add("1122")
Exit Sub
End If
在我在下拉菜单列表中选择让说“123”后,我想在单击时执行此功能
Public Function GetMap()
Dim filename As String = "C:\Users\Downloads\" & txtLot.Text & "." & ddlWafer.SelectedValue & ".txt"
Dim Line As String = ""
Dim sb As New StringBuilder
Dim sb2 As New StringBuilder
Using sr As StreamReader = File.OpenText(filename)
Line = sr.ReadLine
Do
If Line = "#" Then
Line = sr.ReadLine
Do
sb.AppendLine(Line)
Line = sr.ReadLine
Loop Until Line = "##"
End If
Line = sr.ReadLine
Loop Until Line = ""
TextBox2.Text = sb.ToString
End Using
End Function