2015年9月1日 星期二
vb.net ComboBox1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.MaximizeBox = False
ComboBox1.DisplayMember = "管公稱直徑"
ComboBox1.Items.Add("3/8B (10A)") '0
ComboBox1.Items.Add("1/2B (15A)") '1
ComboBox1.Items.Add("3/4B (20A)") '2
。
。
ComboBox2.DisplayMember = "管公稱直徑"
ComboBox2.Items.Add("焊管 Q235-A,Q235-B GB/T13793,T<=12") '0
ComboBox2.Items.Add("焊管 20 GB/T13793,t<=12.7") '1
ComboBox2.Items.Add("無縫管 10 GB9948,t<=16") '2
ComboBox2.Items.Add("無縫管 10 GB6479 GB/T8163,t<=15") '3
。
。
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedIndex = 0 Then GoTo CMB15A
If ComboBox1.SelectedIndex = 1 Then GoTo CMB15A
If ComboBox1.SelectedIndex = 2 Then GoTo CMB20A
If ComboBox1.SelectedIndex = 3 Then GoTo CMB25A
If ComboBox1.SelectedIndex = 4 Then GoTo CMB40A
If ComboBox1.SelectedIndex = 5 Then GoTo CMB40A
If ComboBox1.SelectedIndex = 6 Then GoTo CMB50A
End Sub
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言