本来在做一个简单的测试程序:两张图片框,开始一张是隐藏的。然后用timer定时在这两张图上画点。用按钮3点一次显示一张,再点一次显示另外一张,这样的一个小程序
     出现几个问题:① 按钮3点击后可以实现交替显示图框,但是里面所画点没有了。
                   ② 我原先目的是在X轴方向每隔距离1画一个点,由变量d控制横坐标,为什么显示后确实那么一大堆,哪里出错了?
三个按钮,一个timer,两个图框Dim c As Integer, d As IntegerPrivate Sub Command1_Click()
Timer1.Enabled = TrueEnd SubPrivate Sub Command2_Click()
Timer1.Enabled = False
End SubPrivate Sub Command3_Click()If c = 1 Then
 Picture1.Visible = True
 Picture2.Visible = False
   c = c + 1
Else
   If c = 2 Then
    Picture1.Visible = False
    Picture2.Visible = True
    c = c + 1
Else
c = 1
End If
End If   
End SubPrivate Sub Form_Load()c = 1
Timer1.Enabled = False
Picture1.Visible = True
Picture2.Visible = TrueEnd SubPrivate Sub Timer1_Timer()
Dim a As Double, b As Doublea = Rnd * 1000
b = Rnd * 1000Picture1.PSet (d, a)
Picture2.PSet (d, b)
d = d + 1
End Sub