Solved

Code for Draw Program

Posted on 2000-04-10
12
152 Views
Last Modified: 2010-05-02
I am learnig VB6 and i am looking for a source code to draw lines,circles, and freehand form.

Thanks,

Jairo
0
Comment
Question by:jcardenas
  • 3
  • 3
  • 2
  • +3
12 Comments
 
LVL 9

Expert Comment

by:Ruchi
ID: 2701967
this is a sample example -- form. try to use this following code. this is to basically scribble-draw with your mouse.

Option Explicit

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    frmDraw.CurrentX = X
    frmDraw.CurrentY = Y

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

 If Button = 1 Then
   Line (frmDraw.CurrentX, frmDraw.CurrentY)-(X, Y), QBColor(0)
 End If

End Sub
0
 
LVL 2

Expert Comment

by:Crin
ID: 2701968
Hello Jairo,

just type "Line" in the code module and press F1, in most cases help files covers needs of learning...

Repeat this with word "Circle".

Sincerely yours,

Crin
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2702011
http://www.codearchive.com/vbasic/graphics.html

lots of drawing examples there for you to look through
0
 
LVL 27

Expert Comment

by:Ark
ID: 2705981
<Make a simple drawing program that demonstrates a lot of useful techniques (32K)>
http://www.vb-helper.com/Howto/compat.zip
Cheers
0
 

Author Comment

by:jcardenas
ID: 2707914
Ok,thanks for your excellent help, with the codes submmited by Ark and Ruchi is clear the functions for Line, Circle; but for freehand is not, can you give some help about.

Thanks,

Jairo
Colombia
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2708783
i know one of those samples at the link i pointed to demomstrates that
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 9

Expert Comment

by:Ruchi
ID: 2708815
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2708839
It's about free hand pencil drawing. Very good information
http://www.activex3d.com/Items/LearnVisualBasicFast/Learn_Visual_Basic_Fast_022.htm
0
 
LVL 27

Expert Comment

by:Ark
ID: 2709766
Hi
Interesting sample:
http://www.freevbcode.com/ShowCode.Asp?ID=964
Cheers
0
 
LVL 1

Expert Comment

by:adam8
ID: 2709954
The following code sample won a contest for best code.
I recommend you try it..

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=2801

0
 
LVL 27

Accepted Solution

by:
Ark earned 100 total points
ID: 2710026
Hi
There are a lot of links about drawings at the Web. Next two:
http://www.codearchive.com/vbasic//paint.zip
http://www.codearchive.com/vbasic//drawdemo.zip

IMHO, you have enough to choose :-)
Cheers
0
 

Author Comment

by:jcardenas
ID: 2724596
Thanks for your Support,


Regards,

Jairo
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now