?
Solved

Code for Draw Program

Posted on 2000-04-10
12
Medium Priority
?
160 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

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
 
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 28

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 28

Accepted Solution

by:
Ark earned 300 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

807 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