VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "Form1"
   ClientHeight    =   4575
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5910
   LinkTopic       =   "Form1"
   ScaleHeight     =   4575
   ScaleWidth      =   5910
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdMinus 
      Caption         =   "-"
      Height          =   495
      Left            =   5280
      TabIndex        =   1
      Top             =   3960
      Width           =   495
   End
   Begin VB.CommandButton cmdAdd 
      Caption         =   "+"
      Height          =   495
      Left            =   5280
      TabIndex        =   0
      Top             =   3360
      Width           =   495
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private currentPenWidth As Integer
Private currentRadius As Integer



Private Sub Form_Load()
Me.ScaleMode = vbPixels

currentPenWidth = 1
currentRadius = 30

drawCircle Me.ScaleWidth / 2, Me.ScaleHeight / 2, currentRadius, currentPenWidth, vbBlack

cmdMinus.Enabled = False
End Sub

Private Sub drawCircle(x As Integer, y As Integer, radius As Integer, penwidth As Integer, colour As Long)
    Me.DrawWidth = penwidth
    Me.Circle (x, y), radius, colour

End Sub

Private Sub cmdAdd_Click()
    
    drawCircle Me.ScaleWidth / 2, Me.ScaleHeight / 2, currentRadius, currentPenWidth, Me.BackColor

    currentPenWidth = currentPenWidth + 1
    currentRadius = currentRadius + 10
    drawCircle Me.ScaleWidth / 2, Me.ScaleHeight / 2, currentRadius, currentPenWidth, vbBlack
    
    If currentRadius > 200 Then cmdAdd.Enabled = False
    cmdMinus.Enabled = True
End Sub

Private Sub cmdMinus_Click()

 drawCircle Me.ScaleWidth / 2, Me.ScaleHeight / 2, currentRadius, currentPenWidth, Me.BackColor

    currentPenWidth = currentPenWidth - 1
    currentRadius = currentRadius - 10
    drawCircle Me.ScaleWidth / 2, Me.ScaleHeight / 2, currentRadius, currentPenWidth, vbBlack
    
    If currentRadius < 40 Or currentPenWidth = 1 Then cmdMinus.Enabled = False
    cmdAdd.Enabled = True

End Sub
