1.首先,在左侧工具栏中找到command button的图标,并在适当位置处创建。 2.在属性窗口中找到capition并在他的后面将名字改为“交换”。 3.在窗体中双击“交换”,并在弹出的对话框中输入以下内容 Cls Dim b As Integer Dim c As Integer Dim d As Integer c = Int(Rnd() * 1000) b = Int(Rnd() * 1000) Print "b" & b Print "c" & c d = c c = b b = d Print "b" & b Print "c" & c 4.在上方工具栏中点击启动按钮,即可运行程序