?
Solved

Code for Draw Program

Posted on 2000-04-10
12
Medium Priority
?
158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

765 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