VB6 - Painting Program
All tutorials created in VB6 to be posted in here.
3 posts
Page 1 of 1
Hello, I am going to teach you how to make a painting program in Visual Basic 6. First, open Visual Basic 6 and select "Standard Exe" and click "OK". Now, get a picturebox from the toolbox to the left. Make it as big as you want, and then go to it's properties at the bottom right hand side of the Visual Basic program and change the "Name" property and change it to picDraw. Change the "Appearance" property to 1-Flat. Next, Make a button and go to it's properties and change the "Caption" property to Blue. Now, this is just a simple tutorial, so I am just going to make one option besides painting. OK, right-click the form and click "View Code". Go to the General Declarations section of the form and type:
~GoodGuy17~
Code: Select all
Now, go to the picDraw MouseDown part of the form and type:
Dim Drawing As Boolean
Code: Select all
Go to the picDraw MouseMove part and type:
Drawing = True
picDraw.CurrentX = X
picDraw.CurrentY = Y
Code: Select all
Now, go to the picDraw MouseUp and type:
If Drawing = True Then
picDraw.Line - (X, Y), picDraw.ForeColor
End If
Code: Select all
Go to the Command1 Click and type:
Drawing = False
Code: Select all
Finally, go to the Form Load and type:
picDraw.ForeColor = vbBlue
Code: Select all
I hope this tutorial helped you!Drawing = False
~GoodGuy17~

Awh, I'll try to convert this to VB.NET tomorrow morning and I'll post here 

Hello,
Great tutorial submission GoodGuy17.
Keep it up cooll;
Great tutorial submission GoodGuy17.
Keep it up cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023