Drawing
Learn to make a basic Drawing package using Visual Basic 6 with this Tutorial that Celebrates the CESPage 25th Anniversary
his will show you how to put an Icon in the Task Tray and make a Popup Menu appear when you Right Click on the Icon within the Task Tray, this Tutorial is presenting using the original Images and Code.
Step 1
![New Project](../assets/fignewproject.gif)
Step 2
![Blank Form](../assets/figform1.gif)
Step 3
![Picture Box Control](../assets/figpicbox.gif)
Step 4
![Form with Picture Box](../assets/figpicform.gif)
Step 5
AutoRedraw
property to True
![Picture Box AutoRedraw Property](../assets/figpic1prop.gif)
Step 6
Double Click on the PictureBox of Picture1
and type in the Picture1_MouseDown()
Sub:
Picture1.CurrentX = X
Picture1.CurrentY = Y
Step 7
Double Click on the PictureBox of Picture1
and type in the Picture1_MouseMove()
Sub:
If Button = 1 Then
Picture1.Line (Picture1.CurrentX, Picture1.CurrentY)-(X, Y), vbBlack
End If
Step 8
![Start / Run](../assets/figstart.gif)
![Drawing Running](../assets/figdrawrun.gif)
Step 9
![Drawing Drawn](../assets/figdrawing.gif)
Step 8
![End / Stop](../assets/figend.gif)
This is a very simple Drawing Package, try changing the DrawWidth property of the Picture Box to get a Thicker line,
or the Colour by using another vbColour
e.g. vbBlue
or vbRed
!