我的代码如下:
Private Sub Command1_Click()
Dim CX As Integer
Dim CY As Integer
Dim Limit As Integer
Dim Radius As Integer
Picture1.Print "呵呵!"
Limit = 500
CX = 1000
CY = 1000
For Radius = 0 To Limit
Picture1.Circle (CX, CY), Radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
Next Radius
Picture1.Line (100, 100)-(1000, 1000)
SavePicture Picture1.Image, "c:hehe.bmp"
End Sub
但是编译时报“过程声明与同名事件或过程的描述不匹配“的错误。
请各位高人指点小弟一下。

解决方案 »

  1.   

    前面加一句 Picture1.AutoRedraw = True
    后面改一下 SavePicture Picture1.Image, "c:\hehe.bmp"
      

  2.   

    代码没有问题,你重新添加一个command,将代码复制过去试试
      

  3.   

    从提示看,估计你用了command控制数组,你没指定index
      

  4.   

    vbman2003(家人)的说明正解,代码修改如下: 
    Private Sub Command1_Click(Index As Integer)
    Dim CX As Integer
    Dim CY As Integer
    Dim Limit As Integer
    Dim Radius As Integer
    Picture1.Print "呵呵!"
    Limit = 500
    CX = 1000
    CY = 1000
    For Radius = 0 To Limit
    Picture1.Circle (CX, CY), Radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
    Next Radius
    Picture1.Line (100, 100)-(1000, 1000)
    SavePicture Picture1.Image, "c:\hehe.bmp"
    End Sub