1打开VB
2双击屏幕左端的commandbutton,然后双击左侧label,在出现的窗口的右侧中的caption变成‘红’。再双击label,同理,变成“白”。然后在右侧窗中的forecolor中改变颜色。
3
Private Sub Command1_Click()
Dim a As String
a = Me.Label1.Caption
Me.Label1.Caption = Me.Label2.Caption
Me.Label2.Caption = a
Dim b As String
b = Me.Label1.ForeColor
Me.Label1.ForeColor = Me.Label2.ForeColor
Me.Label2.ForeColor = b
End Sub