Important alert: (current site time 7/16/2013 2:27:46 AM EDT)
 

winzip icon

Tiny GFX32 (Update 25JUL2012)

Email
Submitted on: 7/26/2012 4:05:19 PM
By: Robert Rayment 
Level: Intermediate
User Rating: By 72 Users
Compatibility: VB 6.0
Views: 44934
author picture
(About the author)
 
     TinyGFX32 by Robert Rayment. (Update 25Jul2012.. 1. Avoid rare RTE for miss-match when Extracting some non-standard icons...2. Added new shade Tool. See TinyGFXUpdate.txt for other changes)....Program to make small bitmaps, icons and cursors - 1 x 1 to 64 x 64.... NOTE if the tinygfx.chm help file doesn't work with the program, open it on it's own, uncheck the security button and open.

 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
'Windows API/Global Declarations for :Tiny GFX32 (Update 25JUL2012)
'**************************************
A few when unavoidable
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 68 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

5/5/2007 11:27:41 AMcaver dave

5/5 very nice app. Proving once again that when it comes to graphics on this site you wear the crown
(If this comment was disrespectful, please report it.)

 
5/6/2007 6:09:57 AMAhmedQatar

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

 
5/6/2007 6:55:53 AMPaul Turcksin

Tested some basics: it works fine and I like it. 5/5.
Suggestion: when saving do not "Kill" an older version but move to recycle bin. I can send you the code if you want.
(If this comment was disrespectful, please report it.)

 
5/6/2007 8:09:28 AMJoaquin Marcher

omg, an other spectacular aplication =) 5 gloves form me =P
(If this comment was disrespectful, please report it.)

 
5/6/2007 10:04:23 PMBill H

Ray, I am blown away by your submissions. Your graphics expertise is awesome and you are able to continually raise the bar. Thankyou for sharing your efforts. 5 big ones from me.
(If this comment was disrespectful, please report it.)

 
5/7/2007 7:57:16 AMRobert Rayment

Paul: I have code fot sending to recycle bin. I'll think about it. The standard warning about overwriting is perhaps enough.

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

 
5/7/2007 8:04:05 AMKenneth Foster

Robert, small bug. If you select No on the Reload buttons (R), it reloads anyways. Added "If resp = vbNo then exit sub". Seems to take care of it.
(If this comment was disrespectful, please report it.)

 
5/7/2007 9:14:20 AMRobert Rayment

Thanks Kenneth: Missed that, will correct.

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

 
5/7/2007 8:54:52 PMxpert

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

 
5/8/2007 3:43:35 AMPaul Turcksin

Robert, I agree. The standard overwrite message is more appropriate.
(If this comment was disrespectful, please report it.)

 
5/10/2007 3:53:04 AMMario Grimm

Excellent done. What I would replace is the capturing part. For example:

Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Sub SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

Const HWND_TOPMOST = -1

Private Sub Form_Load()

SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
Me.Hide
Me.AutoRedraw = True

BitBlt Me.hDC, 0, 0, Screen.Width, Screen.Height, GetDC(0), 0, 0, vbSrcAnd

Me.Show
Me.WindowState = vbMaximized

End Sub


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

 
5/10/2007 9:18:43 AMRobert Rayment

Thanks Mario but I can't get that method to work on a subsidiary form. The Clipboard method is OK. I'll have another look however.
(If this comment was disrespectful, please report it.)

 
5/10/2007 3:23:26 PMRobert Rayment

Mario: Got Capture without Clipboard working now - will update in due course - thanks.
(If this comment was disrespectful, please report it.)

 
5/10/2007 3:57:10 PMLorin

All that I see missing is (1) a rectangular Lasso to cut and paste (i.e. move the work around a little) withing an icon image and (2) and undo.
(If this comment was disrespectful, please report it.)

 
5/10/2007 11:53:37 PMRobert Rayment

Lorin: thanks. Undo & Redo are there. Selection rectangle - maybe later.
(If this comment was disrespectful, please report it.)

 
5/12/2007 2:31:32 AMRobert Rayment

More updates including a selection rectangle will be next.
(If this comment was disrespectful, please report it.)

 
5/12/2007 3:50:22 AMMario Grimm

great Robert *thumbsup*
what do you think about a menu for pasting graphics from clipboard. If someone´s copied a picture to clipboard, he could paste it into your application (shrinking to specified size)
(If this comment was disrespectful, please report it.)

 
5/12/2007 4:35:10 AMbeen_lucky


Import/Export <-> Clipboard would be a welcome addition.

Also check up the undo feature. It
dosent work for the first change. Always works ok from the second change onwards.

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

 
5/12/2007 6:44:48 AMRobert Rayment

Mario: Not sure about taking from clipboard for such small images. Also any small images can be drag/dropped onto exe or picbox (if <=48x48). I'll see.
been lucky: Yes I left it like that because the one before the first change is either a Clear or a Reload. However I've changed it for my next update, which will also include a select rectangle.

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

 
5/12/2007 6:46:16 AMRobert Rayment

Next update will be after a more thorough test of all save options - 56 in all!
(If this comment was disrespectful, please report it.)

 
5/12/2007 8:39:49 AMMark

Robert, great code!! How hard would it be to implement a 64x64 mode for Vista icons? 5 from me! Thanks for sharing.
(If this comment was disrespectful, please report it.)

 
5/12/2007 9:46:22 AMOption Explicit

Excellently code app and one that I will be using a lot for creation and modification of toolbar button images and the like. Thanks for another great contribution.
(If this comment was disrespectful, please report it.)

 
5/12/2007 11:46:16 AMRobert Rayment

Mark: I decided to limit it to 48x48 since they are the usual sizes - or were! Vista icons are much harder. They can contain PNG formats, not simple - see LaVolpe submission on this. Additionally you need GDI+ and probably zlib. 64x64 XP icons could be done (I can read 48x48 XP icons) but it makes no sense saving these unless a whole extra screen to edit alpha (transparency) value is done. So I chickened out of all that :)

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

 
5/14/2007 6:23:21 AMRobert Rayment

Update 14 May: If OK next update will use & show transparency masks.
(If this comment was disrespectful, please report it.)

 
5/14/2007 11:20:10 AMranman5

How would it be possible to set a path where bitmap you save would end up in another program that displays the bitmap? Thanks for a tiny but great app. 5 great globes
(If this comment was disrespectful, please report it.)

 
5/14/2007 12:52:50 PMRobert Rayment

ranman5: Somewhere on PSC there are examples of calling another program from within your program. Bitmaps could then be transferred via the Clipboard - if that's what your asking.

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

 
5/15/2007 5:26:13 AMMario Grimm

great job Robert - *thumbsup* carry on - it´s a fantastic app
(If this comment was disrespectful, please report it.)

 
5/17/2007 6:10:15 AMJoaquin Marcher

pretty nice updates =)
(If this comment was disrespectful, please report it.)

 
5/17/2007 6:30:53 AMMario Grimm

since I love to work by using the clipboard, I miss it... :)
Here´s a way to involve it:

Create a new menu - I named it Clipboard (mnuClipboard)
2 submenus -
Insert from Clipboard Strg + V (mnuInserFromClipboard)
Copy to Clipboard Strg + C (mnuCopyToClipboard)

and then just these few lines of code ;)


Private Sub mnuClipboard_Click()
mnuInsertFromClipboard.Enabled = Clipboard.GetFormat(vbCFBitmap)

End Sub

Private Sub mnuCopyToClipboard_Click()
Clipboard.Clear
Clipboard.SetData Form1.picSmall(ImageNum).Image
End Sub

Private Sub mnuInsertFromClipboard_Click()

Dim remPic As IPictureDisp
Set remPic = Clipboard.GetData(vbCFBitmap)

Form1.picSmall(ImageNum).Picture = LoadPicture
Form1.picSmall(ImageNum).PaintPicture remPic, 0, 0, ImageWidth(ImageNum), ImageHeight(ImageNum), , , , , vbSrcCopy

Form1.picSmall(ImageNum).Picture = Form1.picSmall(ImageNum).Image
End Sub


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

 
5/18/2007 2:21:21 AMMario Grimm

thx Robert - fantastic ;) it´s really a great app
(If this comment was disrespectful, please report it.)

 
5/18/2007 7:20:03 AMcaver dave

Very nice piece of coding, just keeps getting better and better. I was going to suggest a copy and paste facility but you beat me to it! - shame i cant vote for it again!
(If this comment was disrespectful, please report it.)

 
5/18/2007 8:09:40 AMTerriTop

Nice update Robert!, How about a magnifying window when performing the capture of bitmaps to improve the accuracy? Drop me a note if you want some code to peform this...Cheers! TerriTop
(If this comment was disrespectful, please report it.)

 
5/19/2007 10:14:47 AMJoaquin Marcher

nice update, the magnifier works pretty nice on me =) really thanks for this spectacular application!! =) you're the best in Graphic programs!
(If this comment was disrespectful, please report it.)

 
5/19/2007 3:33:21 PMRobert Rayment

I also have a version to Capture from a drawn rectangle - but not sure if anybody want's it?
(If this comment was disrespectful, please report it.)

 
5/20/2007 8:57:15 AMJoaquin Marcher

maybe the most important update will be, a new palette of colors more extended
(If this comment was disrespectful, please report it.)

 
5/20/2007 2:45:18 PMRobert Rayment

Joaquin: I'll put in the System palette at the next update - though with over 2000 colors to pic from and a Dropper I thought that would be enough.

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

 
5/22/2007 8:04:05 AMT.Jackson

Yeah - good one Robert. Keep at it. I can see you doing something of commercial quality eventually. *****
(If this comment was disrespectful, please report it.)

 
5/22/2007 12:47:36 PMmarshalfaulkner

Awesome app. ***** A less confusing eraser would be a cross hatch through the box for example, the erase color can be confusing with the actual color gray.
(If this comment was disrespectful, please report it.)

 
5/23/2007 8:44:26 AMcaver dave

This is already of commercial quality, have a look at axialis & iconforge if you dont believe me. psc is fortunate to have a graphics wizard in the form of Robert. This is one of the dev tools every programmer should/must have. regards caver dave
(If this comment was disrespectful, please report it.)

 
5/23/2007 2:24:34 PMRobert Rayment

I'll probably do one more update with a redesigned interface to give larger pixel boxes. Then I'll stop there unless some 'bugs' turn up.

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

 
5/24/2007 8:21:47 AMJoaquin Marcher

omg, thanks Robert to hear my suggestions, the new palette it's awesome {=)
(If this comment was disrespectful, please report it.)

 
5/24/2007 8:38:40 AMRobert Rayment

A couple more fixes to come after this redesign.
(If this comment was disrespectful, please report it.)

 
5/25/2007 3:04:34 AMLefteris Eleftheriades

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

 
5/25/2007 1:19:30 PMLorin

Menu Icons are 10x10.
How to handle that?

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

 
5/25/2007 4:25:16 PMFrédéric Côté

I had a hard time making transparency work on my machine until I realised I was in 16 bits colors. Anyway nice work.
(If this comment was disrespectful, please report it.)

 
5/27/2007 10:03:41 AMKenneth Buckmaster

Exellent work. The suggestion I have is either being able to hide and show toolbars individually or have a simple and an advanced setting as its visually very complicated for someone learning how to use it.
(If this comment was disrespectful, please report it.)

 
5/27/2007 10:52:51 AMRobert Rayment

Thanks for comments.

Lorin: Not sure what your question is. To make 10x10 icons just chnage the width & height to 10x10.

Frederic: Yes really needs 24 or 32 bit color. I could put in a warning.

Kenneth: I could put in a View menu to hide certain toolsets. Maybe, I'll think about it.

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

 
5/27/2007 2:20:50 PMRobert Rayment

I now have a version that also works with 16 bit color on my PC, will update in due course. I also want to try a different approach to rotation in a rectangle.
(If this comment was disrespectful, please report it.)

 
5/30/2007 12:27:05 PMLorin

Must be obvious to some, but not me ... how do I know when I am using the tansparent color since an opaque color can appear the same in the editor as the designated transparent color. Could the cursor change slightly? Or could this be done a different way? Or shift when drawing to get the transparent? What am I missing?
(If this comment was disrespectful, please report it.)

 
5/31/2007 9:45:35 AMRobert Rayment

Lorin: 1st your PC must be set to True Color (not 16 bit color).
2nd Press the small rubber symbol to the right of the main color palette. A red message will show saying L Erases.
3rd Under Preferences make sure you set Mark Transparent pixels.
4th Select the Dot tool. When you click on a pixel a white diagonal line will show as on the screen shot.

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

 
5/31/2007 9:48:40 AMRobert Rayment

Lorin: Let me know if this doesn't work for you.
(If this comment was disrespectful, please report it.)

 
6/2/2007 1:13:33 PMLorin

Just some minor polish:
1) put help .txt in resource and "install" when app starts.
2) move mouse over Visibility and change it (no clicking). Move off color bar and return to normal. Same for other similar features.
3) Click on Image Icons to bring to editor instead of the --> (or in addition to).
4) Capture is a little different. How about when in capture mode, move a little dotted (size of capture) box around. Your little window may fall right on top of what you want to capture. Also, the msg box does not come to the topmost - first time confusing when you don't see it.
Robert, I really enjoy your work and that you share, and you respond to constructive comments. Learning a lot!
(If this comment was disrespectful, please report it.)

 
6/3/2007 1:33:20 AMRobert Rayment

Lorin:
1) Leave that for now - easier to edit.
2) Possibly
3) When no icons the image area is not visisble but could add anyway
4) The Capture window can be moved out of the way with the mouse. I'll see if msgbox can be forced on top.

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

 
6/6/2007 1:33:48 PMRobert Rayment

I have some errant interactivity between interrupted selections and other actions - will update in due course.

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

 
6/8/2007 7:00:12 AMJoaquin Marcher

Nice update, this works spectacular for me...
(If this comment was disrespectful, please report it.)

 
6/8/2007 5:11:49 PMcaver dave

What can I say this just keeps getting better Robert i use it all the time and recommend it as well. You created a project a while ago Icon Seeker a link between the two would be an amazing update and pip the ace at a 1000yds!
regards
caver dave
(If this comment was disrespectful, please report it.)

 
6/11/2007 3:54:18 AMRobert Rayment

caver dave: Add icon seeker - maybe - I'll think about it - no promises :)

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

 
6/14/2007 7:15:41 PMcaver dave

bravissimo rollover iconforge & axialis
that certainly pips the ace Robert
(If this comment was disrespectful, please report it.)

 
6/14/2007 11:21:10 PMJoaquin Marcher

omfg now this it's the extreme of VB, Robert you're the best with VB :P Exe icons extractor =) wow nice idea
(If this comment was disrespectful, please report it.)

 
6/15/2007 4:39:07 AMRobert Rayment

NOTE: You can add other files to extract from if you want -eg .ani .ocx .ica.
Goto cmdExtract_Click on frmExtractor and add to the dialog filter. I've avoided *.* since this shows loads of files that never contain any icons.

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

 
6/15/2007 9:43:27 AMTom Law

Superb piece of work.
(If this comment was disrespectful, please report it.)

 
6/20/2007 8:40:12 AMJoaquin Marcher

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

 
6/25/2007 8:05:08 AMMark

64x64... when did you sneak that in there? Great work Robert!!
(If this comment was disrespectful, please report it.)

 
6/25/2007 12:41:51 PMRobert Rayment

Thanks for comments folks!
Apart from any bugs this is now finished :)


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

 
8/14/2007 5:45:11 PMJoaquin Marcher

nice, i love this update =)
(If this comment was disrespectful, please report it.)

 
2/23/2008 7:28:09 AMMario Grimm

I really enjoy this application. Great work. But when I habe already saved my icon and I press yes when the message box appears (did you save your icon...) - it doesn´t close.
And what I do miss is the possibility to create a new icon - or am I blind?
;o)
(If this comment was disrespectful, please report it.)

 
2/23/2008 11:28:29 AMRobert Rayment

e-mailed Mario

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

 
11/1/2008 2:18:08 AMRde

Thanks Robert

Simple to use yet powerful

Great Job and easily 5 *****

Happy Coding,
Rd :)
(If this comment was disrespectful, please report it.)

 
4/20/2009 5:10:14 AMSiavash

I'm disagree with you all! It is'nt a good code!
IT'S AN EXCELLENT ONE!!!

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

 
5/13/2009 1:07:30 AMthorax

Thanks for the update. :)
(If this comment was disrespectful, please report it.)

 
9/8/2009 3:08:17 AMThePiper

Very good. Little lack: System Color Picker: Defined/Added Custom Colors will not be saved. Should be added to the .ini File or registered using SaveSettings. Is a bit tricky but no problem for you. ;-)
(If this comment was disrespectful, please report it.)

 
9/10/2009 11:06:41 AMRobert Rayment

ThePiper: System colors can be selected - to right of palettes. Saving colors, maybe - how many?
(If this comment was disrespectful, please report it.)

 
9/19/2009 1:28:10 AMT.Jackson

Gifted, eccentric genius.

I'd throw in the word "professional", if the thing looked more like a graphics package and less like the instrumentation cluster of a spaceship.
(If this comment was disrespectful, please report it.)

 
9/19/2009 1:37:26 AMT.Jackson

ThePiper: what is your favorite number?
(If this comment was disrespectful, please report it.)

 
9/22/2010 11:17:35 AMDave Carter

Thank you very much Raymond, your fabulous program is exceedingly welcome for all the time and grief it will save me preparing icons. Dave : )
(If this comment was disrespectful, please report it.)

 
9/22/2010 1:28:16 PMthorax

Again thanks for the update. :)
(If this comment was disrespectful, please report it.)

 
9/24/2010 8:09:10 AMDave Carter

I apologise for getting your name wrong Robert.

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

 
10/2/2010 6:06:05 AMandrew

Hi Robert,

All your programs are of a professional quality.
Do you know of anyway in which it is possible to adjust the Hue, Saturation and Luminance of a picture in Visual basic 6? he image format is JPG.

Thank you in advance.

mail me at:

andrew@yeoman.eclipse.co.uk.

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

 
10/10/2010 9:19:21 AMT.Jackson

Robert will teach you all about VB6 when you go in mate. Long bay jail mate.
(If this comment was disrespectful, please report it.)

 
4/15/2011 4:28:18 AMDave Carter

Hi Robert, I must say thank you again, TinyGFX32 makes it really easy to create images and icons for my programs :D
(If this comment was disrespectful, please report it.)

 
5/13/2011 9:36:22 AMthorax

Thanks again for the update and your hard work! Greetings from Switzerland - Martin
(If this comment was disrespectful, please report it.)

 
9/5/2012 11:30:54 PMc.h.liu

This is definitely the best icon editor i ever found!
Any one if he/she wants to do small image job,
then this application is good enough, and is
the only choice!!!Thanks for your contribution.
(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.