Important alert: (current site time 7/16/2013 2:21:32 AM EDT)
 

winzip icon

LaVolpe WordArt (GDI+ Paths) [27 Mar 08]

Email
Submitted on: 3/27/2008 2:00:59 PM
By: LaVolpe 
Level: Intermediate
User Rating: By 31 Users
Compatibility: VB 6.0
Views: 18102
author picture
(About the author)
 
     Updated:: Fixed mem leak save routine (oops); added minimal unicode support to sample form for playing & as promised, SaveAs Jpg/Png/Bmp capable. A project I wrote to learn more about GDI+ graphics paths. Think it can be useful for others who want to explore paths. I thought I was going to make this a full-blown WordArt-clone but have since lost interest. This project may be updated in the future, but it will remain low on my priorities. Graphic paths are fun to play with, but short of creating a Paint-like application or using paths to manipulated direction/speed of some animated object I can't find much use for them. Have fun playing with it. 26Mar08: Added ability to save a GDI+ path to JPG, Bitmap and/or PNG formats. 27Mar08: Found & fixed mem leak in save routine. In sample form, added some unicode support for playing.

 
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 Winzip to 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 72 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate 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

3/7/2008 12:31:23 PMSoorya

Thanks Keith,
It would be the best week end time pass for the VB coders. It is really GREAT !
(If this comment was disrespectful, please report it.)

 
3/7/2008 1:13:12 PMRussell Sanders

Well you've outdone yourself. I'll be busy for weeks now. Thanks for the post and keep it up. *****
(If this comment was disrespectful, please report it.)

 
3/7/2008 2:33:35 PMLaVolpe

In cWordArt.BuildDisplay, remove lines of code allowing Underline & StrikeThru font style. Not coded; never got around to it.
(If this comment was disrespectful, please report it.)

 
3/7/2008 3:22:13 PMnikos

excellent work
ÔÝëåéï !
(If this comment was disrespectful, please report it.)

 
3/8/2008 1:26:11 AMmahesh Kurmi

Just a one comment: "you are genius"
i am a big fan of yours....
(If this comment was disrespectful, please report it.)

 
3/8/2008 5:05:02 AMenmity

excellent, keep going
(If this comment was disrespectful, please report it.)

 
3/8/2008 10:31:38 AMRuturaaj

This looks really nice and I feel this can be a nice foundation for Image Watermark application. Keith, you're the master of Image Processing; why don't you give a try to Image Watermark tool?
(If this comment was disrespectful, please report it.)

 
3/8/2008 10:39:52 AMRuturaaj

Just a small things that I would like to let you know. You've forgotten to handle Cancel error on Colour Selection Dialog boxes for Shadow and Emboss. But that's certainly nothing much and anyone can easily counter that stuff. The hard work is done with some real good code here. Thanks for sharing it with all of us!
(If this comment was disrespectful, please report it.)

 
3/10/2008 7:59:57 AM_Merlin_

One word: WOW!
(If this comment was disrespectful, please report it.)

 
3/10/2008 8:46:08 AMLight Templer

Unique stuff like nearly all times! My ***** for and regards - LiTe
(If this comment was disrespectful, please report it.)

 
3/10/2008 7:04:48 PMLaVolpe

Ruturaaj, thanx will add error trap in sample form when I update it. Will update in next week or so to add saving as png/jpg plus any major errors that are reported btwn now & then.
(If this comment was disrespectful, please report it.)

 
3/12/2008 4:19:50 AMJoe Jordan

hmm, crashes my IDE with a GDI+ error when I get to the line: .Move picCanvas.ScaleWidth... in ShowSample.
(If this comment was disrespectful, please report it.)

 
3/12/2008 8:48:06 AMLaVolpe

Joe, replied offline.
For all others: FYI. Using GDI+ is very similar to subclassing. Don't hit END or STOP while project is running. Crashes can occur, not immediately in most cases, but they can occur.
(If this comment was disrespectful, please report it.)

 
3/13/2008 12:38:47 PMKenneth Foster

When updated demo loads, its a lot slower than previous submission. Also text is messed up.
(If this comment was disrespectful, please report it.)

 
3/14/2008 3:05:22 PMLaVolpe

K.Foster. Sorry about that, the current upload fixes it (test code was cause).
All others. Upload of 12Mar08 fixes potential crash due to wrong vartype used in GDI+ call.
(If this comment was disrespectful, please report it.)

 
3/14/2008 6:29:33 PMEd Wilk

Mar.12 update working better here!
Another nice one LaVolpe!
Thanks for sharing,
Edgemeal
(If this comment was disrespectful, please report it.)

 
3/15/2008 4:09:40 AMSoorya

Hi Keith, I thought this crash could be fixed if we use all the GDI+ API inside a tlb file (Gdiplus.tlb). Am I wrong ?
(If this comment was disrespectful, please report it.)

 
3/16/2008 5:31:54 AMSomesh Doshy

Fantastic Work!!! as always
(If this comment was disrespectful, please report it.)

 
3/16/2008 2:21:41 PMLaVolpe

Soorya, GDI+ crashing IDE will continue to happen if running proj in ide is not shut down properly, TLB or not. If one wants to add extra safety here, look at my solution: txtCodeId=69434
(If this comment was disrespectful, please report it.)

 
3/18/2008 12:06:57 AMBen Ng

Great codes of "Classic Visual Basic" author. Thanks.

By the way, can I send an email message to you. Please give me your email address. My email is vbcombass@yahoo.com.

Thanks in advance.
(If this comment was disrespectful, please report it.)

 
3/26/2008 4:13:37 PMLaVolpe

Oops, saving routine had a boo-boo. Will update a bit later, but here is what you will want to fix.
Class: clsWAPath
Routine: SaveToImageArray
Code: replace hObj with br as shown...
If BackColor < 0& Then
...br = CreateSolidBrush(vbWhite)
Else
...br = CreateSolidBrush(BackColor)
End If
FillRect dDC, uRect, br
DeleteObject br
(If this comment was disrespectful, please report it.)

 
4/2/2008 2:35:13 PMSteveDude

This is like really cool. Anyone know how to save it to an EMF or WMF?
(If this comment was disrespectful, please report it.)

 
10/30/2008 2:32:02 AMPierre_Bontecou

LaVolpe another great post, your code is always among the best VB Code online.
(If this comment was disrespectful, please report it.)

 
3/31/2009 9:10:44 AMthorax

Good code and excelente work. as all your works :)
(If this comment was disrespectful, please report it.)

 
6/11/2010 12:03:07 PMandrew

Hi Everyone,

This is an appeal for help.
Is it possible to combine Lavolpes Wordart program with Tim Arheits Word Art user control and Simon Whiteheads WprdArt Custom WordArt program

Thanking all in anticipation

(If this comment was disrespectful, please report it.)

 
2/17/2011 5:06:27 AMMathius

Excellent code...!!! God Bless you
(If this comment was disrespectful, please report it.)

 
5/2/2011 4:10:44 PMCajunCoder

Has anyone migrated this to .NET?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.