Public Class Form1
Dim down = False
Dim mybrush = Brushes.Red
Dim wi As Integer = 10
Private Sub Form1_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown
down = True
End Sub
Private Sub Form1_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove
wi = ComboBox1.SelectedItem
If down = True Then
Me.CreateGraphics.FillEllipse(mybrush, e.X, e.Y, wi, wi) ' e.X /e. y 는 마우스 좌표입니다.
End If
End Sub
Private Sub Form1_MouseUp(sender As Object, e As MouseEventArgs) Handles Me.MouseUp
down = False
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
mybrush = Brushes.White
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.Invalidate()
End Sub
Private Sub Button3_Click_1(sender As Object, e As EventArgs) Handles Button3.Click
mybrush = Brushes.Blue
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
mybrush = Brushes.Red
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
mybrush = Brushes.Lime
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
mybrush = Brushes.Gray
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
mybrush = Brushes.Black
End Sub
End Class