窗体上有一组合框Combo1,一文本框Text1,三个命令按钮,要求:

2024-11-29 17:16:18
推荐回答(3个)
回答1:

'修改确定
Private Sub Command1_Click()
Combo1.List(Combo1.ListIndex) = Text1.Text
Command1.Enabled = False
End Sub

'修改
Private Sub Command2_Click()
Command1.Enabled = True
Text1.Text = Combo1.Text
End Sub

'添加
Private Sub Command3_Click()
Combo1.AddItem (Text1.Text)
End Sub

'窗体调入时,设置确定按钮不可用。
Private Sub Form_Load()
Command1.Enabled = False
End Sub

请参考:http://218.65.5.218/VBNET/showcourse.asp?id=84

回答2:

Private Sub Form_Load()
Command2.Enabled = False
End Sub
Private Sub Command1_Click()
Text1.Text = Combo1.Text
Command2.Enabled = True

End Sub
Private Sub Command2_Click()
Combo1.List(Combo1.ListIndex) = Text1.Text
Command2.Enabled = False
End Sub
Private Sub Command3_Click()
Combo1.AddItem Text1.Text
End Sub

Command1 修改 Command2 确定 Command3 添加
刚试过、可运行的

回答3:

,你健康 看