Important alert: (current site time 7/16/2013 2:36:56 AM EDT)
 

winzip icon

Candy Button (3rd Update) Rev2

Email
Submitted on: 2/18/2007 7:16:52 AM
By: Mario Villanueva 
Level: Beginner
User Rating: By 84 Users
Compatibility: VB 6.0
Views: 52371
 
     Candy Button - is a nice button that can look like XP button, XP Toolbar button, Cristal (OSX) and IceBlock (Based on Cristal) all buttons can have Checked/Unchecked state. Use it if you like, I have seen some buttons here that are forbidden for commercial use and I think it's absurd!! This is a small gift to this community. Features *Small api usage (only 4 apis) *4 different styles Some votes wouldn't be bad! ;) -------------------------------------------------- Updates: Now is Subclassed!!!!(No Timer) *Code was sorted and reduced *Drawing now is faster!!! *Font propertys (thank's Kenneth Foster!) *No more green background, no flickering problem or Click event outside the button Thank's to all for your opinions, suggestions and solutions!!!(and of course for the votes!) (now around 10 apis are used). Tell me what you think, it was tested only for xp. ------------------------------------------ *Some bugs in design mode fixed (Special thank's to Heriberto and Ken Foster) *Subclass method now sorted (Thank's to Paul Caton for his advise)*Introduced a new button style: Plastic. I hope you like it ;) -------------------------------------------------- News: Some bugs were fixed, speed was really improved (and I mean a lot!), and new properties were added (thanks to Steppenwolfe) Enjoy it! And don't forget to leave a feedback ;) -------------------------------------------------- Small bugs fixed and speed was improved again, know it should be fast for almost any purpose. Check it out!!! :o 1 Last revision for those who could not load the style.

 

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 :Candy Button (3rd Update) Rev2
'**************************************
Several
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 3 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 Beginner 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

4/10/2006 5:41:48 PMPaul Bahlawan

Just took a quick look... They are very good looking buttons! Someone around here may complain about using a timer in a user control... but it's working good!
(If this comment was disrespectful, please report it.)

 
4/10/2006 5:44:13 PMOption Explicit

Nice! This is closer to Intermediate than Beginner though. You should add some comments also. It will be interesting to sort through your graphics code. Thanks for sharing. 5 "crystal buttons" from me.
(If this comment was disrespectful, please report it.)

 
4/10/2006 7:28:42 PMGary Staunton

Like the look, and the way that they flash when clicked and mouse moved outside button boundaries.

However, there doesn't seem to be an Enabled property. Although the flashing is kinda cool, how do I cancel the Click event (usually done by moving outside the boundary)? (Maybe a value passed through the Click event: IsOnButton As Boolean). Switching Style from say XP_Button to Cystal, I breifly see the green background.

Just some thoughts, not bagging the control at all, fatastic effort and look forward to next version. Here are my 5Gs.
(If this comment was disrespectful, please report it.)

 
4/10/2006 8:02:43 PMKenneth Foster

Really nice. I did add font properties to it. Also had as issue where the rectangle was showing when app is run. Added Picture1.picture = loadPicture("") as the last item in the DrawButton procedure and took care of the problem.Don't know why it was happening.No one else seems to be having any trouble.You get a 5 from Texas.
(If this comment was disrespectful, please report it.)

 
4/10/2006 8:05:51 PMKenneth Foster

Another thing, I agree with Paul, the timer is not good. Maybe one of the guru's here on PSC can elimanate it.
(If this comment was disrespectful, please report it.)

 
4/10/2006 9:26:39 PMMario Villanueva

Hi, thanks for the comments! Paul, I tried to let it as simple as possible, it's easy to port it to Paul Catons self-subclasser usercontrol in fact I've that version too but I prefer this. Option Explicit: sorry about the comments but you'll agree that it's very easy to follow :)

PD: I'm working on another and faster solution that i hope you will see soon.
(If this comment was disrespectful, please report it.)

 
4/10/2006 9:30:33 PMMarkAnderson

Thanks for sharing Mario
(If this comment was disrespectful, please report it.)

 
4/10/2006 9:30:57 PMMarkAnderson

Thanks for sharing Mario 5*
(If this comment was disrespectful, please report it.)

 
4/11/2006 11:29:01 AMMario Villanueva

Thanks for the Comments and votes!!! Gary: Suggestions are well received, Enabled property is not yet done(sorry), I don't understand what you mean about the Click event(It's fired after every MouseUp/KeyUp event). What do you want to know? if the mouse is hover the button while the Click event is fired? Tell me and I'll see how to correct it. I'm working on the green background thing and making it faster. I think that the next time I will submit 2 versions (Timer/Subclassed versions). Kenneth: maybe you could send me your version to see it my mail is mario_aar at: yahoo.com.ar
Thanks for all your replies!
(If this comment was disrespectful, please report it.)

 
4/11/2006 7:10:04 PMHeriberto Mantilla Santamaria

Hi

In my OS the border of the button appear, why?
(If this comment was disrespectful, please report it.)

 
4/11/2006 7:49:49 PMGary Staunton

Mario:
Using a standard command button, click and hold the mouse down, move the outside the button boundary and it pops up, releasing the mouse outside the button boundary doesn't fire the Click event, yours does. Click and hold on the CandyButton and drag the mouse outside the button boundary, it will flash (ok), release the mouse button and the CandyButton will fire the Click event even though the mouse pointer isn't over the button anymore - ideally there would be a property returned with the Click event to inform the developer that the mouse was outside the button boundary or was within it. Hope that's clearer :-)
(If this comment was disrespectful, please report it.)

 
4/12/2006 3:39:21 PMMario Villanueva

Gary: Ok, I get the idea, I'll try to correct it (thanks!). Heriberto: plz, explain a bit more about what happens and what os are you using (button borders are drawn in the code). -Si lo podés explicar en español mejor-
(If this comment was disrespectful, please report it.)

 
4/12/2006 5:05:44 PMJuan Carlos San Román

Excellent button and it is all drawing with api, no pictures. Here are 5 form me.
(If this comment was disrespectful, please report it.)

 
4/12/2006 10:07:44 PMKenneth Foster

Mario, sounds like Heriberto has the same problem I had.The XP style border draws behind the Crystal button for some reason. Anyways the fix I mentioned took care of it.I'm using Win XP Home edition by the way.
(If this comment was disrespectful, please report it.)

 
4/13/2006 4:49:05 AMleigh

Mario,
You already have the code to do the click event. In the UserControl_MouseUp just add 'If IsHover then RaiseEvent Click'. This will only raise the click event if the button is released while over the control.
Do the same on UserControl_MouseMove to stop the button flickering when moving the mouse with the button pressed...
(If this comment was disrespectful, please report it.)

 
4/13/2006 3:23:12 PMtheNerd

I think this button looks really nice but renders a little slow. 5 ***** from me and I encourage you to keep going on this.
(If this comment was disrespectful, please report it.)

 
4/14/2006 10:29:03 AMJefe - Boss

Mario - excellent work!! With the new update though, the button does not seem to work well (or at all) in the IDE. Even when running from the IDE it only seems to work 1/2 of the time. Once compiled it is great! Awesome job! You have made me rethink attempting to create my own button so I can stop using others!
(If this comment was disrespectful, please report it.)

 
4/14/2006 10:52:33 PMKevin Ritch

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

 
4/15/2006 12:34:13 AMMario Villanueva

Jefe - Boss: this version use Paul Caton Self-Subclassed Usercontrol, I can't imagine why it does not work for you, if you could tell me what VB version are you using and what OS you have i will investigate what could happened. I tested it using VB6 and WinXP. Thank's for the feedback. (I forgot to post the timer version for those who don't like using so many API's but I will re-submitt it soon)
(If this comment was disrespectful, please report it.)

 
4/15/2006 1:18:38 AMPaul Turcksin

Impressive and very nice. The 'iceblock' style works during design but not at run time though. But if compiled everything is perfect. 5 Iceblocks from me.
(If this comment was disrespectful, please report it.)

 
4/15/2006 12:07:55 PMPaul Caton

Mario, for best relability, I suggest you move the subclass routines to the bottom of the file, just above the callback.
(If this comment was disrespectful, please report it.)

 
4/16/2006 12:07:24 AMHeriberto Mantilla Santamaria

Hi.

For the people that take the problem with the borders, changed this line of event UserControl_ReadProperties

m_Style = PropBag.ReadProperty("Style", 0)

for

Style = PropBag.ReadProperty("Style", 0)
(If this comment was disrespectful, please report it.)

 
4/16/2006 8:38:42 AMKenneth Foster

For the borders problem , I added "Usercontrol_Resize" as last line in the Read Properties and in the Usercontrol_Initialize, I put "m_Style = Style".Hope this helps.
(If this comment was disrespectful, please report it.)

 
4/17/2006 10:34:00 AMKenneth Foster

Mario,in the UserControl_MouseDown and UserControl_DblCLick,need to move the DrawButton line so it is after the RaiseEvent line.Eliminates a small bug.ex: on main form under mousedown and mouseup events, try changing the forecolor on a button.Hope this helps.
(If this comment was disrespectful, please report it.)

 
4/17/2006 1:40:18 PMHeriberto Mantilla Santamaria

Hi Mario.

The new style is great, one suggestion.

Haz que cuando el botón se tenga presionado y alejes el mouse del mismo y te vuelvas a ubicar sobre él, no se pierda el estado de enfoque presionado.

Anyway thx for sharing.
(If this comment was disrespectful, please report it.)

 
4/17/2006 10:26:47 PMGary Staunton

Mario: Changes are looking good - just one small, tiny problem :-)

Although the Click event doesn't fire when mouse is realeased outside the button, if we drag the mouse back over the Candy button (while mouse is still down), it doesn't go back to the MouseDown state (gui) - although the Click event will be fired.

To see what I mean, Click and hold on the CommandButton (Command1) drag mouse outside boundary (see state change) drag mouse back inside boundary (see state change). Hope you don't think that I'm nnit picking :-)
(If this comment was disrespectful, please report it.)

 
4/18/2006 2:31:38 AMRichard Mackillican

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

 
4/18/2006 7:31:28 AMTerriTop

Very Nice!! I love the fact that it is now subclassed...excellent job on the conversion...Keep it coming!! 5 Candies from me. ;-D TerriTop
(If this comment was disrespectful, please report it.)

 
4/18/2006 11:18:45 PMMario Villanueva

Thank's Ken I will fix it! Gary the Click event it's not fired outside the button because in real commandbutton it's is not fired neither, about the state: you're right as Heriberto suggested it should reflect the button state when you return the cursor over the button. I will fix it, thanks! I'm glad of seeing so many Comments and votes!!! :)
(If this comment was disrespectful, please report it.)

 
4/18/2006 11:19:18 PMMario Villanueva

Comming Soon: Color presets!!!
(If this comment was disrespectful, please report it.)

 
5/3/2006 7:09:29 AMBrian Ail

true for the first comment: you cannot have more than 16 simultaneous timers running in Windows 98 at the same time, including timers from other apps
in other words, the app wont run if i put more than 16 buttons...right.
(If this comment was disrespectful, please report it.)

 
5/3/2006 7:43:32 AMRip0r

Stunning work! 5 from me ;)
(If this comment was disrespectful, please report it.)

 
5/7/2006 6:49:16 PMMinhTAm

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

 
5/8/2006 7:06:31 AMFrank Maier

Nice button, but he is too slow, to use him in a real program, especially on an older machine. 4 from me.
(If this comment was disrespectful, please report it.)

 
5/8/2006 8:24:37 AMEmmanuel Addo Amoafo and George Osei

Great work. But can you do something about the loading speed
(If this comment was disrespectful, please report it.)

 
5/8/2006 10:22:19 AMdreamvb

Very Nise button, However as someone else said, it's extreamly slow upon opening the program after it's compiled. I see you used a timer, maybe you can replace it with the API one. or have you tryed to mix a little ASM into it.

anyway nise project 5 *****
(If this comment was disrespectful, please report it.)

 
5/8/2006 10:37:32 AMJefe - Boss

I was looking forward to a great update but ran into issues. A runtime error of Division by Zero occured on both projects. All I did was unzip and attempt to run the apps as you had packaged them. Still looking forward to seeing it work!
(If this comment was disrespectful, please report it.)

 
5/8/2006 4:36:37 PMVesa Piittinen

It is possible to optimize this project greatly by using byte or long arrays to store the graphics data, it is far faster to manipulate arrays than to draw pixel-by-pixel using API. One way to get and set the bytes is to use GetBitmapBits and SetBitmapBits (if I remember the API function names correctly, been a while).
(If this comment was disrespectful, please report it.)

 
5/8/2006 5:56:43 PMRicardo Gonzalez Gaete

Muy Buen control, pero no entiendo pq lo despliegas sobre un control Picture so lo podrias hacer sobre UserControl.. yo ya lo prove es mucho pero mucho mas rapido....

Saludos de Chile
Te Felicito por tu trabaj
o
(If this comment was disrespectful, please report it.)

 
5/8/2006 7:46:28 PMSAIF

Nice work Mario !
but, it gives me an error 11 (Division by zero) !!!!
i'm on Xp- SP2
please try to help me how to get it work.
(If this comment was disrespectful, please report it.)

 
5/8/2006 9:55:16 PMMario Villanueva

To Brian Ail, thanks, i didn't know that! but the subclassed version could handle this problem. I'll see if I can improve the speed but it shows pretty fast on my computer (AthlonXP 2.2). I heard that GetBitmapBits and SetBitmapBits are no longer supported and that I should use SetDIBbits instead. There are a lot of ways of improving it, I will see what i can do.
(If this comment was disrespectful, please report it.)

 
5/8/2006 10:07:27 PMSPY-3

I keep getting this error of Division by zero on this line
HighlightColor = BlendColors(vbWhite, Color, CrystalParam.Ref_MixColorFrom + j * CrystalParam.Ref_Intensity \ CornerRadius)
under drawcrystal (CrystalParam.Ref_MixColorFrom = 0 ) CornerRadius=0 also it looks good in the pic so try to fix it
(If this comment was disrespectful, please report it.)

 
5/9/2006 11:49:19 PMxpert

I get "Division by zero" error in:
HighlightColor = BlendColors(vbWhite, Color, CrystalParam.Ref_MixColorFrom + j * CrystalParam.Ref_Intensity \ CornerRadius)
because CornerRadius=0
Please fix it!!!

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

 
5/11/2006 8:32:08 AMHappy Lobster

I get the division by 0 error too :(
(If this comment was disrespectful, please report it.)

 
5/13/2006 9:43:39 AMKenneth Foster

Fix for above Divide by zero. In UC ReadProperties, Change m_Style = PropBag... to read Style = PropBag...
Just eliminate the m_ Works for me.Hope this helps.
(If this comment was disrespectful, please report it.)

 
5/15/2006 10:33:33 AMJefe - Boss

Kenneth - Thanks for the pointer. Compiles just fine now. I just didn't have the time to sift through the code. An EXCELLENT control! Especially with the WMP options!
(If this comment was disrespectful, please report it.)

 
5/16/2006 8:27:17 AMSteppenwolfe

Speed is much better now Mario.. I like the new disabled style too. Thanks
(If this comment was disrespectful, please report it.)

 
5/16/2006 3:47:05 PMHeriberto Mantilla Santamaria

Yeah the speed is much better and the control now are in chinese version online.
(If this comment was disrespectful, please report it.)

 
5/17/2006 12:00:50 AMMario Villanueva

jajaja, Come on don't be so bad! I just replace SetPixelV with SetDIBits API, and a roundrect API for the runtime HighLight, it's not that confusing. There are some points of the code that are critical for speed up things. Maybe I should comment more the code so anyone could get the main idea faster. :)
(If this comment was disrespectful, please report it.)

 
5/18/2006 9:08:53 PMJarvis

What a great code. The only problem is when I put your control into a project I can see the buttons in design time but when at run time the buttons appear flat with a simple background color and a border. The XP style button works and looks fine at run time but using the other styles just give a plain bck color and border. Please fix.
(If this comment was disrespectful, please report it.)

 
5/20/2006 12:05:22 PMOrlando

I got the same problem too

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

 
5/22/2006 12:33:12 PMCyDog

I'm using it as the exit button on my app and I get VB to Abort when used under the IDE, is this Correct for any other users?
(If this comment was disrespectful, please report it.)

 
5/23/2006 4:35:48 AMAlastair Vance

I have placed the button on a user control which is placed on the form. It runs ok within the IDE, however, when I compile I get the error "Window handle isn't subclassed." followed by "Invalid procedure call or argument." on the line z_Funk.Remove "h" & lng_hWnd

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

 
5/23/2006 4:56:10 AMAlastair Vance

I got it to compile ok, but still getting those error sometimes in the IDE even when closing design windows (not running).
(If this comment was disrespectful, please report it.)

 
5/26/2006 10:25:34 PMMike Ulik

It is an excelent button except for one small iten it doesn't support multi lines that I need.

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

 
5/28/2006 6:14:27 AMHardStream Software Development

Very cool button, but the rounded borders look a bit cr*ppy..
Maybe you could try to emulate alpha pixels by looking at the background color and mixing that with the border color of the button??

Anywayz.. another 5* for you
(If this comment was disrespectful, please report it.)

 
5/29/2006 12:43:15 PMYorgi

Great job on the speed enhancements. Runs much faster now. Screen resolution changes are still a problem. WinXP 1024x768 DPI:110% for example, controls and text do not align properly. 5* - Keep up good work!
(If this comment was disrespectful, please report it.)

 
5/29/2006 1:19:18 PMBroken Arrow

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

 
5/29/2006 5:58:36 PMsdube

Way cool!

One remaining glitch tho:
Click the button with the left mouse button and keep pressing, you have the button with an active state color. Leave the control (still with the button pressed) and the color changes to unselected. Fine.
Now, come back to the control. Voilà, the color is still showing unselected.

Look at the vanilla VB button and you will see the behavior.

Keep up the good work.
(If this comment was disrespectful, please report it.)

 
5/30/2006 3:40:01 AMRob C

The most edible that I have seen 5

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

 
5/30/2006 9:36:47 AMPJH

Your code is fantastic! but.. There is a problem dealing with Unicode when letting CAPTAIN property. So I would like to recommend you a another method.

1) Use 'DrawTextEx' instead of 'DrawState' or 'DrawText'

2) Use API 'lstrlen()' instead of 'Len()' or 'LenB()'

For example..) In advance, suppose '*' as 1 Unicode character, especially Asian character.

Len("ABC") ¢¡ 3
Len("ABC*") ¢¡ 4
¢¡ All characters are measured as 1 Byte.

LenB("ABC") ¢¡ 6
LenB("ABC*") ¢¡ 8
¢¡ All characters are measured as 2 Byte.

lstrlen("ABC") ¢¡ 3
lstrlen("ABC*") ¢¡ 5
¢¡ ASCII characters are measured as 1 Byte.
¢¡ Asian characters are measured as 2 Byte.

I'm hoping to see your next version.

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

 
5/30/2006 1:57:38 PMStan Amditis

I love this control, but cannot use it until I add support for keyboard shorcuts (&Save, &New, etc). 5 globes from me.
(If this comment was disrespectful, please report it.)

 
5/31/2006 4:03:12 PMBrian Copeland

I am getting this error as well when i attempt to compile:

"Window handle isn't subclassed." followed by "Invalid procedure call or argument." on the line z_Funk.Remove "h" & lng_hWnd

I am not sure what to do, as I can't compile anymore (runs perfectly in the IDE however). Anyone have any ideas? Otherwise a top notch control
(If this comment was disrespectful, please report it.)

 
6/8/2006 8:26:13 PMMario Villanueva

Replace that line with:

z_Funk.Remove z_Funk.Count

since we are subclassing 1 window,it isn't a problem.

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

 
6/29/2006 3:18:33 PMSoorya

Its much better look than most of the button controls available. But seems buggy. why am I getting few buttons are Flat and mono colored ?
Why few buttons are not preserving the style we set ?
Waiting for Update 4.
Thanks a lot to share this code with us.
(If this comment was disrespectful, please report it.)

 
7/10/2006 4:48:30 PMAnthony Dunleavy

I cant seem to use the button as a CLOSE button. It works fine compiled, but when it is used as a CLOSE button, when app closes, it crashes the IDE. I will tinker with it, but has anyone come up with a solution for this?

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

 
8/11/2006 9:31:47 AMFinny Abraham

the button appears to be flat, when it is used. the theme is disappeared.
(If this comment was disrespectful, please report it.)

 
10/30/2006 12:13:06 PM$ For my Code

Its suppaaaaa...... Excellent. The candy is sweet. Thanx man
(If this comment was disrespectful, please report it.)

 
11/3/2006 5:49:39 AMPranjal

Excellent !!! You get a FIVE from me.
I am using it in my 'PKs Net Radio'. Check out http://pranjal.does.it.
Thanx a lot...... :-)
(If this comment was disrespectful, please report it.)

 
11/23/2006 4:26:34 PMWalid

Dear Mario Villanueva,
Thank you so much for your perfect work!
It's realy nice code!
But I have problem! When I start the program, the style for some buttom is hide!
I hope to give you a form picture for this problem but I cant attach picture in this Feedback..
Could you please porvide me your comments about this problem?

Thanks in advance
Walid
eng.walid@al-awail.com
(If this comment was disrespectful, please report it.)

 
1/18/2007 5:09:42 AMg_charal

BRAVO!!!!
Keep on good work....
5 stars from me too.
(If this comment was disrespectful, please report it.)

 
2/2/2007 8:14:15 AMMario Villanueva

Walid: this submittion should fix your problem (those hidden styles).
I'm glad you liked it, use it it's free for any purpose.
(If this comment was disrespectful, please report it.)

 
2/4/2007 3:04:31 AMHajo

thank you very mutch for the great Candy Button. I love it but i have found a bug !? When the button have the Focus and ENTER Key was pressed the Button was released BUT nothing happens. On a "normal" VB Button the Click Event was triggered when the Button have the Focus and the ENTER Key was hit by the User. I think some user work wie TAB Key and when the Candy Button have focus and ENTER was hit to trigger the Click Event an nothing happens is not so pretty.
(If this comment was disrespectful, please report it.)

 
2/7/2007 6:04:51 AMJoe

Mario, thanks so much for these buttons they are really spectacular! I have one problem though, the border is showing when used with the Microsoft tabbed Dialog Control. I've tried the above suggestions but none work. Sometimes they display correct when the tab first shows but when comming back to it, they do not show right. Has something to do with the clipped regions not staying clipped. -hmmmm. But, wow! I still love 'em VERY much. I've written code to automatically adjust the 4 colors after setting just one, very neat. Mac is my favorite. Any other things to try? Thanks so much for ALL your time.
(If this comment was disrespectful, please report it.)

 
2/8/2007 5:56:44 PMMario Villanueva

Joe and Hajo, I'll be checking those issues, right now I'm a little bit out of time, but I'll check it. Thank's for the feedbacks, I'm also interested in making it unicode enabled, so I hope you are going to hear something from me soon.

Sigan programando, un saludo grande desde Argentina!
(If this comment was disrespectful, please report it.)

 
2/8/2007 6:20:34 PMxpert

Excellent control. 5 globes.
Just a little detail: The control doesn't have a ToolboxBitmap (there is the file CandyButon.ctx, but doesn't seem to work). Should be nice that the control's ToolboxBitmap be a little crystal button...
(If this comment was disrespectful, please report it.)

 
2/18/2007 8:18:04 AMHajo

Mario, thank you very, very, very mutch for the new version (which fixing my problem)! my wish became true! And again thank you for sharing this fantastic Project with us! Your Great Mario!
(If this comment was disrespectful, please report it.)

 
2/19/2007 5:04:53 AMJoaquin Marcher

Exellent!!!!!

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

 
2/19/2007 12:28:38 PMDavid Ross Goben

Great work. ***** from me. By the way, some buttons are prohibited from commercial use because the simple fact is, why should someone else profit from your own hard work without compensation? If someone uses your buttons in a for-$ product, you should be compensated, even if it is just the docs and About-Product window giving you credit. Some people work really hard on this stuff, and they were good enough to share it with other hobbiest, and some is worth big $$$. There are too many people out there who would jump at the chance to steal another's work, if they see the potential to make $ from it. Again, great work!
(If this comment was disrespectful, please report it.)

 
2/19/2007 7:03:59 PMMario Villanueva

Joe's problem was solved too, you are welcome, this place gave me too many good ideas that i'm very glad, as i said i did it just for fun, so the best you can do is using it. Thank's for the comments, i really appreciated.
(If this comment was disrespectful, please report it.)

 
2/21/2007 6:15:04 AMFazeel Amjad Khan

Dear Mario, your work is hightly appericiated. 5 Crystals ***** from me.
Thanks for sharing your wonderfull piece of work. you are a magician....
(If this comment was disrespectful, please report it.)

 
3/9/2007 2:21:33 AMjasonh

where is the ocx file, i run this and get an exe file, not an ocx file?
(If this comment was disrespectful, please report it.)

 
3/10/2007 4:48:57 AMjasonh

Just sent mario a email and got a prompt reply, I was unaware of what I had to do, so for others, this is what mario said:

Hi, there's no such OCX you should only add the .ctl file to your project and you're done, now you can enjoy the CandyButton on your project.

Greets,
Mario.
==

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

 
7/1/2007 1:20:51 PMAlisa

This program is very nice. Make my program is complete
(If this comment was disrespectful, please report it.)

 
7/1/2007 1:24:10 PMAlisa

Dear Mario, your work is hightly appericiated
(If this comment was disrespectful, please report it.)

 
11/24/2007 11:27:34 AMHG

Mario, the buttons are incredible. But when in the IDE, if there is an error, the program crashes with the MS Windows "... encountered an error and must shut down.."
Send Report or Don't Send are my choices. This happens in your demo: In the click event of any button add, me.print 3/0. The click on the button - boom, you're gone.

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

 
11/24/2007 12:09:22 PMHG

Mario, the message I sent earlier on the program shutting down with the "3/0" (or any error) had an old email address. This has the current one.
(If this comment was disrespectful, please report it.)

 
1/2/2008 2:25:53 AMYogi Yang

great work. add more styles to it please.
(If this comment was disrespectful, please report it.)

 
10/28/2008 10:54:26 AMManuel

Enhorabuena Mario. Un trabajo espectacular. Gracias por compartirlo con todos nosotros.
Un saludo
Manuel
(If this comment was disrespectful, please report it.)

 
12/26/2008 9:47:53 AMRob C

OLEDragOver OLEDragDrop would have been handy(ah! such is life).
But it is still worth 5.
Thanks
(If this comment was disrespectful, please report it.)

 
1/27/2009 12:38:19 PMMorgan Haueisen

I made changes to your button control. If you are interested, respond to this e-mail and I will send you what I did.
(If this comment was disrespectful, please report it.)

 
2/16/2009 2:02:29 AMRob C

Hi Morgan,
What were the changes, and can we get it ?
Regards,
Rob
(If this comment was disrespectful, please report it.)

 
6/12/2009 10:16:44 AMErnest

It still error when using 'END" command to close aplication
(If this comment was disrespectful, please report it.)

 
3/3/2010 8:06:39 PMmscirocco

Very nice job, great demo code too, thanks.
(If this comment was disrespectful, please report it.)

 
4/10/2010 2:48:30 AMDevogen

Great code, but a shame this button doesnt use hwnd.

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

 
6/27/2011 11:36:08 AMEI4JR

Fantastic Buttons. Thank you.
when you use the keyboard shortcut example &File it under lines the F but the text is not in the centre of the button.
Thanks for sharing.
(If this comment was disrespectful, please report it.)

 
5/15/2012 1:09:59 AMCornelius

I am urgently looking for this control to have a caption text wrap feature added to this control. It works extremely well, except if I use small buttons, the caption cannot be displayed in full. Please look into it and send me an updated control via email, if you please...
(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.