TEXT1.TEXT填的是什么值?SHAPE控件根据什么条件改变自己的颜色?

解决方案 »

  1.   

    text的作用是什么?循环的次数吗?
      

  2.   

    Private Sub Command1_Click()
    If Command1.Caption = "启动" Then
    Command1.Caption = "停止"
    Else
       Command1.Caption = "启动"
    End If
    End SubPrivate Sub Form_Load()
    Shape1.FillStyle = 0
    Shape2.FillStyle = 0
    Shape3.FillStyle = 0
    Shape4.FillStyle = 0
    Command1.Caption = "启动"
    End SubPrivate Sub Timer1_Timer()End SubPrivate Sub Text1_Change()If Command1.Caption = "停止" Then
    Randomize
    For i = 0 To 1 '设置次数
    PauseTime = 0.01   ' 设置暂停时间。
    Start = Timer
       Do While Timer < Start + PauseTime
          DoEvents
       Loop
    Shape1.FillColor = RGB((255 * Rnd) + 1, (255 * Rnd) + 1, (255 * Rnd) + 1)
    Shape2.FillColor = RGB((255 * Rnd) + 1, (255 * Rnd) + 1, (255 * Rnd) + 1)
    Shape3.FillColor = RGB((255 * Rnd) + 1, (255 * Rnd) + 1, (255 * Rnd) + 1)
    Shape4.FillColor = RGB((255 * Rnd) + 1, (255 * Rnd) + 1, (255 * Rnd) + 1)
    Next
    End IfEnd Sub
      

  3.   

    需要 text1 Shape1 Shape2 Shape3 Shape4 Command1