本帖最后由 bcrun 于 2012-08-20 20:42:04 编辑

解决方案 »

  1.   

    Dim x1, y1 As Single
    Private Sub picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then
            x1 = X: y1 = Y
        End If
        List1.AddItem "圆心坐标X:" & x1 & " Y:" & y1
    End Sub
    Private Sub picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then
            Picture1.AutoRedraw = False
            Picture1.Refresh
            Picture1.PSet (x1, y1)
            Picture1.Circle (x1, y1), Sqr((X - x1) ^ 2 + (Y - y1) ^ 2)
        End If
        
    End Sub
    Private Sub picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then
            Picture1.AutoRedraw = True
            List1.AddItem "圆半径:" & Sqr((X - x1) ^ 2 + (Y - y1) ^ 2)
        End If
    End Sub