VB编程问题,急要~~
来源:百度知道 编辑:UC知道 时间:2024/06/02 04:06:11
注意:在结束程序运行前,必须先单击交换按钮,后单击连接按钮,退出程序时必须通过单击窗体右上角的关闭按钮。
Option Explicit
Private Sub Form_load()
Option1.Caption = "交换"
Option2.Caption = "连接"
Text2.Height = Text1.Height
End Sub
Private Sub Option1_Click()
Dim A As String
A = Text1.Text
Text1.Text = Text2.Text
Text2.Text = A
Option1.Visible = False
End Sub
Private Sub Option2_Click()
If Option1.Visible = True Then
Option2.Value = False
Exit Sub
End If
Text1.Top = 0
Text1.Left = 0
Text2.Top = 0
Text2.Left = Text1.Width
Text3.Text = Text1.Text + Text2.Text
End Sub
Private Sub Form_load()
Option1.Caption = "交换"
Option2.Caption = "连接"
Option2.Visible = False
Text1.Top = 0
Text2.Top = 480
Text1.Left = 0
Text2.Left = 0
End Sub
Private Sub Option1_Click()
Option1.Visible = False