Solved

Code for Draw Program

Posted on 2000-04-10
12
153 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

863 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

26 Experts available now in Live!

Get 1:1 Help Now