VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H80000009&
   Caption         =   "简单的画图程序"
   ClientHeight    =   2055
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3825
   LinkTopic       =   "Form1"
   MousePointer    =   99  'Custom
   ScaleHeight     =   2055
   ScaleWidth      =   3825
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   495
      Left            =   2880
      Picture         =   "V6J07-14.frx":0000
      ScaleHeight     =   495
      ScaleWidth      =   615
      TabIndex        =   0
      Top             =   120
      Visible         =   0   'False
      Width           =   615
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DrawState As Boolean
Dim PreX As Single
Dim PreY As Single

Private Sub Form_Load()
    DrawState = False
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
        MousePointer = vbCustom
        MouseIcon = LoadPicture(App.Path + "\pen04.ico")
        DrawState = True
        PreX = X - 220
        PreY = Y + 220
    End If
    If Button = 2 Then Circle (X, Y), 280
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If DrawState = True Then
        Line (PreX, PreY)-(X - 220, Y + 220)
        PreX = X - 220
        PreY = Y + 220
    End If

End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
        MousePointer = vbDefault
        DrawState = False
    End If
End Sub

