Quick Search for:  in language:    
program,allows,users,choose,color,size,draw,p
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,014,970. lines
 Jobs: 119. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Excel Into a webpage
By Bill Donahue on 7/2


Unroll2 - Update
By Cyber Chris on 7/2


MultilinePWD
By Cyber Chris on 7/2


Click here to see a screenshot of this code!Song/Poem Assistant
By Peter Rowan on 7/2

(Screen Shot)

Click here to see a screenshot of this code!GPA Cal
By KBM-00 on 7/2

(Screen Shot)

Click here to see a screenshot of this code!Connection Via the Telephone line.No internet or cable.Just the telephone line
By Nass ClickMan on 7/2

(Screen Shot)

DBTool
By Make Strömberg on 7/2


Click here to see a screenshot of this code!MSChart Simple Example
By Sebastian Pereira on 7/2

(Screen Shot)

CString v1.5
By Ultimatum on 7/2


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

A Paint program

Print
Email
 
winzip icon
Submitted on: 8/4/1999
By: Ben Doherty  
Level: Advanced
User Rating: By 111 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 20421 times.
 
(About the author)
 
     This program allows users to choose a color and pen size to draw on a picture box and the user can also make circles and fill the picture box with a certain color. ****UPDATED**** August 14. New tools include Circular Gradient maker and Gradient maker,eye dropper and I also put the tools into a list box so it is easier to find. I also improved the pen tool so it doesn't skip.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 6 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
8/4/1999 5:59:00 PM:Ben Doherty
If you have any questions or comments, 
please email me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/7/1999 9:40:00 PM:Ian Ippolito
FYI,
This gave me a slight problem due 
to a reference to a file that I don't 
have:the API declaration loader.  After 
removing it from the references howver, 
the program worked fine.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/1999 5:23:00 PM:none
Does it save the image?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/1999 7:22:00 PM:Ben Doherty
Nope, it doesn't save.  What i have 
tried hasn't worked, but im still 
working on new tools and a better pen 
tool (It doesn't skip).
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/18/1999 12:04:00 PM:Randal
To save the contents of the picBoard 
picturebox use the SavePicture 
function.
Example:
	SavePicture 
picBoard.Image, "c:\TEST2.BMP"
This 
would save the contents of picBoard to 
"c:\test2.bmp".
To load a picture 
from a file use 
LoadPicture.
Example:
Set 
picBoard.Picture = 
LoadPicture("c:\TEST2.BMP")
This 
would load the "c:\test2.bmp" into 
picBoard.  
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/26/1999 12:56:00 PM:hamzi
thanks about the examples
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/13/1999 7:06:00 AM:lewis
Does anyone know how to resize a 
picture inside a picture box?  If you 
can help me, please email me. Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/8/1999 3:06:00 AM:Troy
you should use a commondialog to open 
and save.  use this!
Private Sub 
mnuFileOpen_Click()
CommonDialog1.Filte
r = "BMP (*.bmp)|*.bmp|gif" & _
"(*.gif)|*.gif|JPG 
(*.jpg)|*.jpg"
CommonDialog1.ShowOpen
Set picBoard.Picture = 
LoadPicture(CommonDialog1.FileName) 
'("c:\TEST2.BMP")
End 
Sub
Private Sub 
nmuFileSave_Click()
CommonDialog1.Filte
r = "BMP (*.bmp)|*.bmp|gif" & _
"(*.gif)|*.gif"
CommonDialog1.ShowSave
SavePicture picBoard.Image, 
CommonDialog1.FileName
End Sub
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/8/1999 7:21:00 AM:Steve
Interesting, but I could show you a 
couple of tricks to improve your 
effects.  For instance since I have 
started messing with this program i 
improved the circle function to work 
more like MS paint, and added a line 
function, as well as I changed to 
gradient function to work much like 
photoshop's version does.  I don't know 
if anyone would like to see that, if 
you do I can upload it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/20/1999 5:57:00 PM:Max Adams
Pretty nice project, but it needs a 
save and open option.  Pretty cool 
though, keep up the good coding!
-Max
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/24/1999 9:29:00 PM:Ben Doherty
Thank you all for your feed back, sorry 
i haven't updated in awhile, i will be 
updating this as soon as possible with 
many new tools, and mabye a new 
interface.  So Check back by next 
saturday and it should be up.
-Ben
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/30/1999 4:25:56 PM:InFeStEd-ArCh0n
Dudes, BTW, when you fill a color you 
don't have to fill the entire picture 
box.  You can fill just areas of the 
same color.  Check this out:
Private 
Declare Function ExtFloodFill Lib 
"Gdi32" (ByVal hdc As Long, ByVal X As 
Long, ByVal Y As Long, ByVal crColor As 
Long, ByVal wFillType As Long) As 
Long
Private Sub 
ThePik_MouseDown(Button As Integer, 
Shift As Integer, X As Single, Y As 
Single)
    ThePik.FillColor = 
RGB(0, 0, 0)
    ExtFloodFill 
ThePik.hdc, X / Screen.TwipsPerPixelX, 
Y / Screen.TwipsPerPixelY, 
ThePik.Point(X, Y), 1
End 
Sub
Of course you don't have to 
divide the X and Y by the twips per 
pixels, since the X and Y are in twips 
I had to change them to pixels because 
the API call requires it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/19/2000 8:07:10 AM:Michael
i added a Load & Open to this
& make 
it work over the network :)
As well as 
single mode....
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/24/2000 11:44:17 PM:Ryan
the paint bucket only changes the 
background color.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/20/2002 7:53:39 PM:spider
i noticed that too.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/29/2002 2:48:41 AM:Dark Syphom
No offence... but how did this program 
win?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/15/2003 2:10:49 PM:
yeah... i agree... how could something 
like this win... it is nice and it well 
coded... but win with 111 votes 
:o
hmmm... check out 
http://www.planetsourcecode.com/vb/scrip
ts/ShowCode.asp?txtCodeId=30854&lngWId=1
now this is one cool sweeeeeeet paint 
program :D 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/15/2003 7:11:03 PM:Ben Doherty
Ok listen up...
Back in August of 1999 
when I submitted this program, the 
programs of the Month were decided by 
the owner of this website.  The voting 
didn't exist back then, or it had just 
started, I don't exactly remember.  
Also, this was the very first paint 
program on Planet Source code.  At the 
time this was excellent code.  Since 
then people have taken the paint 
program idea and improved 
exponentially.  So that's why this 
program won back in 1999.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.