Important alert: (current site time 9/2/2014 7:14:21 AM EDT)
 

winzip icon

LaVolpe Buttons (Updated)

Email
Submitted on: 6/2/2006 2:18:04 AM
By: LaVolpe 
Level: Advanced
User Rating: By 151 Users
Compatibility: VB 6.0
Views: 100657
author picture
(About the author)
 
     No longer updating this old project; just maintaining it. Latest patch (01Jun06) to fix bug in ReadProperties routine. Original description follows ===================== Updated: Added checkbox/option button modes to include the diagonal buttons (Mode/Value Properties). Also included a custom shaped button that takes shape from its picture property. Some notes to mention: 1) checkbox face color intentionally made to look lighter than normal button face when Value is True. XP, Java, & Mac are best guess as to what it would look like. 2) Option button selections toggle other option buttons, but do not synchronize with VB's option buttons. 3) No change to round buttons; short of using anti-aliasing, could not figure a way for smoother look--experimenting with GDI+. 4) If compiled in app, adds 110k. 5) If compiled as OCX, < 100k using P-Code & minimal app size increase; not bad considering the common dialog is 138k. 6) No timer control used. 7) Reorganized to help follow code easier. 8) Comments welcomed, votes are up to you. Project inspired by Gonchuki's Chameleon Buttons v1.x. Last Update Uploaded: 30 Oct 2004/1405 EST to fix font problem. Last update 23 Oct 2005 to include a separate OCX project.

 
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 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

5/5/2003 12:59:26 PMLaVolpe

Ghost grab handles still an issue while in design mode. Option buttons operate independently of VB's option buttons. Please report bugs & check back occassionally as updates will be posted here with the latest date shown above as last line of code description above.
(If this comment was disrespectful, please report it.)

 
5/5/2003 2:09:39 PMAlain GUERIN

LaVolpe, you are the king !
Nice work, nice code fully commented, very nice idea to create CTL.
Thanks, once again, for sharing !
5 globes from me
(If this comment was disrespectful, please report it.)

 
5/5/2003 2:59:16 PMVlad Vissoultchev

don't tell me, you hit "delete sibmission" by accident or what :-))

cheers,
</wqw>
(If this comment was disrespectful, please report it.)

 
5/5/2003 3:12:51 PMLaVolpe

Vlad, nope. The 1st post was to get feedback so I can finish it. This post adds the checkbox/option button functionality & I wanted it as a new post to advertise the update. I know I lost 20+ votes, but want one version on PSC that I can upload changes to.
(If this comment was disrespectful, please report it.)

 
5/5/2003 7:10:30 PMAPATEL

I am using your control, a previous version of the lavolpe button control. I am having difficulty in upgrading it to the new version any idea?
(If this comment was disrespectful, please report it.)

 
5/5/2003 7:49:25 PMLaVolpe

This is a rewrite. Previous version is not compatible, has memory leaks, and has other design flaws. This version arose from the ashes of that version.
(If this comment was disrespectful, please report it.)

 
5/6/2003 12:11:20 AMlagware

great. i gave it 5 globes. but you should have just updated the file to your other project, that already had a ton of votes instead of making a new one. some ppl might forget to vote again.
(If this comment was disrespectful, please report it.)

 
5/6/2003 1:18:47 AM

Forget to vote for these? Never! LaVolpe, from a wannabe programmer (with apps to my credit), you are the King. 5 Planets
(If this comment was disrespectful, please report it.)

 
5/6/2003 1:20:44 AMFady

Sir, I have to say, you are a genius at work! Keep it up, and thanks for sharing
(If this comment was disrespectful, please report it.)

 
5/6/2003 3:03:53 AMDondata

Does this, when in XP style, use the users choosen theme?
(If this comment was disrespectful, please report it.)

 
5/6/2003 3:40:17 AM

hey, keith! it's good that i still visit this site.. i never knew youmade a new button! it's great! i haven' seen any errors yet.. thanks! you get an excellent rating from me.
(If this comment was disrespectful, please report it.)

 
5/6/2003 4:11:33 AMBroken Arrow

LaVolpe! I love you!
(If this comment was disrespectful, please report it.)

 
5/6/2003 7:26:37 AM

your ctrl rocks man. i love u. take my 5 globes as usual...
(If this comment was disrespectful, please report it.)

 
5/6/2003 7:44:12 AMLight Templer

Hi man!
No more memory leaks: That tops ChamButton! ;)

I really! like the diagonal style! Great
idea!

One suggestion: As VB5 user (yeah! ...) I got trouble with the two lines:
Tag = UserControl.ContainerHwnd

I subst with
Tag = UserControl.Parent.hwnd
and the Option button stuff works fine in a frame. Now I shouldn't use containers without a hwnd prop, but ok ...
What do u think about it ?

btw: I 'm just searching for an anti-aliasing solution for 'round-style' for you. Mail will come when successfully.

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

 
5/6/2003 8:46:18 AMLaVolpe

Templer, correct. Optionbuttons to work properly need their container to have hWnd prop. Sorry, don't specifically design projects towards VB5 compati-bility, although work hard for Win95 compatibility.
(If this comment was disrespectful, please report it.)

 
5/6/2003 8:47:58 AMLaVolpe

Dondata, XP Themes? Nope, not without subclassing or using a timer to check for theme change. The individual apps should check for theme change & change the button's backcolor/forecolor props.
(If this comment was disrespectful, please report it.)

 
5/6/2003 8:55:39 AMLaVolpe

Smooth round button edges. Just a note folks: If I go with antialiasing, every pixel around the edge needs to be blended into the parent control's backcolor. I can draw a circle using trig functions that matches the API quality, but the pixel count exceeds 3000 for small buttons & >15000 for larger buttons. Is it worth it? Or do we wait for better APIs, or do we cheat and use a bitmap & draw over it? Hmmm...
(If this comment was disrespectful, please report it.)

 
5/6/2003 11:38:51 AMGerhard

Gr8 Stuph man...

5 nice mars planets for u...
Could you tell me if the button works on all ms os versions...?

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

 
5/6/2003 1:09:08 PMLaVolpe

Gerhard. All except maybe WinNT3.x
(If this comment was disrespectful, please report it.)

 
5/6/2003 4:26:19 PMLaVolpe

Updated>Round button depressed state & round option/checkbox looks much nicer. lv_Round3DFixed style no longer applicable & left in for bkdwd compatibility. Other issue fixed: NT, when in IDE, and set as default button, not always drawn as default.
(If this comment was disrespectful, please report it.)

 
5/6/2003 7:02:13 PMMichael Canejo

It's getting alot better. You have my vote.
(If this comment was disrespectful, please report it.)

 
5/7/2003 5:49:31 AM

I love all your code. 5 globes after this comment.
Anyway, could you please build two other button styles: Office XP Style and Transparent Style. Office XP Style is the most I like but not in your code.

Thanks alot!

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

 
5/7/2003 6:07:16 PMKenneth Foster

Talk about a control that will knock your hat in the creek, this is it. 5 globes from Texas
(If this comment was disrespectful, please report it.)

 
5/7/2003 7:49:14 PMViktor E

Do you have any "non-5" code ? :) Outstanding work is your middle name.
(If this comment was disrespectful, please report it.)

 
5/8/2003 8:18:26 AMLight Templer

Sorry for posting above! Plz delete it. Just got your email and checked out the circle mod. Exactly what was missing! More soon ;)
Regards
Light Templer
(If this comment was disrespectful, please report it.)

 
5/8/2003 9:28:50 PMAgung Nugroho

Maybe you should consider to add _OnMouseOver() and _OnMouseOut() events.. would be a nice gift to lazy developer like me!
(If this comment was disrespectful, please report it.)

 
5/9/2003 8:21:40 AMM.C

Huiiii great. 5 globers.
(If this comment was disrespectful, please report it.)

 
5/9/2003 8:35:04 AMLaVolpe

Guys/Gals, you do have mouse over/out events. It is called MouseOnButton(True/False). Or am I misunderstanding?
(If this comment was disrespectful, please report it.)

 
5/9/2003 1:04:11 PMLaVolpe

Strange bug, don't know how to fix yet, but do have a workaround. Buttons in frames if multiple frames on a form. If VB menu option SAVE clicked, button props don't save, weird. If this happens, simply close the form vs Saving & button props save fine.
(If this comment was disrespectful, please report it.)

 
5/9/2003 10:09:40 PMRon Weight

Thanks for sharing this. I appreciate all the work you've done. Very professional and very helpful.
(If this comment was disrespectful, please report it.)

 
5/10/2003 12:56:49 AMAgung Nugroho

Sorry, I didn't realize its there..
(If this comment was disrespectful, please report it.)

 
5/10/2003 3:34:52 PMLaVolpe

Updated. Flat round borders fixed, borders drawn last to prevent pics/text from printing on borders, CalculateBoundingRects & DrawButtonIcon routines tweaked.
(If this comment was disrespectful, please report it.)

 
5/10/2003 3:43:47 PMRott_En

Thank you for sharing this....I am really stunned to see such nice coding! 5 planets from me too! keep it real!
(If this comment was disrespectful, please report it.)

 
5/12/2003 5:15:06 AMPeeter Puusemp jr.

It's great. At last I have found a wonderful button control. I like it very much, but I have a little complaint: the Win95 style button has too wide bright grey line in the left and top of the button. I don't like it very much. If it were a little bit more narrow then it would be like the common button control and it would be more beautiful, I think. Is it possible to make the grey line more narrow??? I will be in the heaven then and this control will be perfect to me. I hope you can help me.

With best wishes, Peeter Puusemp

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

 
5/12/2003 9:05:25 AMLaVolpe

Peeter, in the DrawButton_Win95 routine, replace the 2 midShade=RGB(...) values with midShade=-1. This will do the trick. The 95 button is really based off of the Win98 button.
(If this comment was disrespectful, please report it.)

 
5/12/2003 9:43:48 AMPeeter Puusemp jr.

Thank you! Now this control is perfect for me.

This is just the best!
(If this comment was disrespectful, please report it.)

 
5/13/2003 10:44:50 AMHaru Glory

I really hate to vote you because your my greatest enemy in this site, but i can't help it. I've seen your program and I really love it! 5 shining globes. *** YOU'RE PROFESSIONAL ***
(If this comment was disrespectful, please report it.)

 
5/13/2003 11:40:16 AM

Excellent work... What about a .net port?
(If this comment was disrespectful, please report it.)

 
5/14/2003 7:24:41 AM_Merlin_

La Volpe, this is just another of your codes to download and nurse very carefully. Pitty it isn't compattible with earlier version(s), but hey, I can live with that. Just a little more work for me ;) I'm sorry though for the vote... I can't give you more than 5 balls.

Merlin is the name, and logic is my game...
(If this comment was disrespectful, please report it.)

 
5/14/2003 8:28:59 AMDream

Speechless .. no wait, absolutely brilliant work, I missed the update. Amyone know where LaVolpe lives? Im never gonna win a prize with him around >:)
(If this comment was disrespectful, please report it.)

 
5/22/2003 9:07:37 AM

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

 
5/23/2003 5:29:44 AM

Please update the latest version here! PSC members are waiting for new release upload. Many thanks

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

 
5/23/2003 6:24:29 PMLaVolpe

As requested. Added custom button shapes. Tweaked several routines & modified appearance of disabled images. ReadMe updated to include all properties and public functions.
(If this comment was disrespectful, please report it.)

 
5/24/2003 2:47:17 AM

5 globals again!
Thanks Lavolpe.
What about Office XP Styles? Have you finish yet?

TuanHai

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

 
5/25/2003 9:15:43 PM

Great code man, I'm jealous of it. I have find something dough what most ppl don't now. In the declaration section of Form1 there is a declaration of variables: "Private I, J, K As Integer". If you Declare variables like that, only K is an integer, I and J are declared as Variant. It should be: Private I As Integer, J As Integer, K As Integer. Just to let you know. Btw in VB .NET is this ok.
(If this comment was disrespectful, please report it.)

 
5/28/2003 5:17:40 AMAdel D. Mendoza

I've used the previous version of this button and now i am using it again. I can't help using it again and again. Keep on posting man, you're GREAT!! 5 planets for me... :-)
(If this comment was disrespectful, please report it.)

 
5/28/2003 2:47:46 PM

Well, Lavolpe. I send a mail to you, but you can't answer... I understand. My suggestion is :
1) Diagonal Left : Top small, Base big
2) Full Diagonal : Top small, Base big like a tab control.
Sorry for my poor english

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

 
6/9/2003 1:18:10 PMLaVolpe

Minor Bug. Oops #2. While creating non-rectangular regions (custom buttons), routine will fail with region handles <0. Fix is to replace line in routine NormalizeImage...
If bAdjRegion And rtnRgn>0 with...
If bAdjRegion And rtnRgn
(If this comment was disrespectful, please report it.)

 
6/16/2003 10:27:07 PM

Very impressive. I saw yr menu bar usage on an inventory system! It really gives a new look to an usual boring VB interface!
(If this comment was disrespectful, please report it.)

 
6/21/2003 5:51:13 PM

Very impressive. But only 1 problem: every time I compile it to OCX, an error message that says "No public usercontrol detected" occurs. How can i fix this?
(If this comment was disrespectful, please report it.)

 
6/26/2003 1:53:23 PM

LaVolpe you are king of VB programming, you are great and hope you continue your good work. Thanks for giving the whole world programmer to impress their boss / customer with this nice button interface!! James Thang, Malaysia, Kuala Lumpur.
(If this comment was disrespectful, please report it.)

 
6/26/2003 2:10:22 PM

Btw can it work in Win98, Windows Me and Windows 2000 Server/Professional?
(If this comment was disrespectful, please report it.)

 
6/29/2003 10:33:46 PM

5 globes from me. And LaValope I love how you are sticking with this. You should win alot of the coding contests. Ty for sharring with us.
(If this comment was disrespectful, please report it.)

 
6/30/2003 10:11:41 AMMartin Engelbrecht

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

 
7/4/2003 12:31:28 PM

hey, keith! haven't heard from you for quite a while! god, this is goooooood!!! excelleente!!!

you get the highest rate once again from me! =]
(If this comment was disrespectful, please report it.)

 
7/4/2003 12:32:33 PM

the post above was from genesia, okay?

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

 
7/5/2003 2:43:46 PM

Very very very impressive work. Well done!!!
(If this comment was disrespectful, please report it.)

 
7/8/2003 2:55:16 PMLaVolpe

FYI. Those that asked questions have been answered off-line. If you asked a question & didn't get an answer; try again. The email address PSC game me for you may be bogus... :)
(If this comment was disrespectful, please report it.)

 
7/9/2003 8:08:29 PM

I made the OCX from the ctl, and i can use in design but in run time i get the error '429' (can't create activex control), and after error '-2147287010' (device I/O error).
What should i do?
(If this comment was disrespectful, please report it.)

 
7/10/2003 9:13:58 AMLaVolpe

Error 429? Answered off-line. Most likely an OCX registration issue.
(If this comment was disrespectful, please report it.)

 
7/16/2003 12:57:46 AM

You are amazing, truely. Not only to you make such amazing code but your support is better then MS. You truely are an amazing person and you deserve all the praise you get. 5*
(If this comment was disrespectful, please report it.)

 
7/17/2003 3:52:43 PM

Bug Report: I noticed that when using the left-diagonal button and I minimize the entire midi form and then maximize the button does not repaint properly. It paints it as a rectangle instead of the original form. Good work though...
(If this comment was disrespectful, please report it.)

 
7/18/2003 2:16:38 PMLaVolpe

Thanx for the bug report. Couldn't reproduce issue; answering offline.
(If this comment was disrespectful, please report it.)

 
7/18/2003 2:23:27 PM

I think I just found the reason for bug issue!
I am using the Sheridan Resizer control. When this is on the form. The described behavior appears. when its not then the behavior disappears. This doesn't necessarily mean this is a bug in your code. Thanks for the support. :)

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

 
7/18/2003 3:19:58 PMLaVolpe

The above comment did identify a code shortfall. Placing buttons in container on a MDI Parent causes errors. MDIs have no Parent.Font nor Parent.Scalemode properties; fix uploaded here 18 Jul.
(If this comment was disrespectful, please report it.)

 
7/20/2003 1:38:40 AM

Hi, Really u r great.
no word for that fantastic work.
(If this comment was disrespectful, please report it.)

 
7/23/2003 7:52:51 AM

When put in InnovaDSXP.DocumentWindowForm (Innovasys DockStudioXP)the button dont showed in run time.
(If this comment was disrespectful, please report it.)

 
7/23/2003 8:55:50 AMLaVolpe

InnovaDSXP? My only guess is that control/application may be subclassing its controls & preventing the buttons from receiving normal windows messages.
This is something I cannot troubleshoot since I don't have that program. Suggest compiling it to an OCX & trying.
(If this comment was disrespectful, please report it.)

 
7/27/2003 2:35:17 PM

Great stuff. Lavolpe you are the best. I have a problem with TAHOMA font. The control is not working with it. Mike, Greece.
(If this comment was disrespectful, please report it.)

 
7/28/2003 9:18:40 AMLaVolpe

Re: Tahoma font problem. Sent reply but email address provided was bogus. Sorry.
(If this comment was disrespectful, please report it.)

 
7/30/2003 6:51:55 AMBroken Arrow

LaVolpe, you are simply the master of the experts!
(If this comment was disrespectful, please report it.)

 
7/30/2003 12:45:50 PMRon Weight

Is there any way to gracefully and easily upgrade to this updated version? The only way I can make it work is to load the project, click through the errors about not finding the control, selecting the control again as a component, then manually replacing every button on every form (when project loaded, it converted all buttons to picture boxes). I haven't tried just overwriting the old OCX with the new one. What's the best way to use this new version?
Thanks.
(If this comment was disrespectful, please report it.)

 
7/30/2003 10:54:41 PM

Ur the man. Great work. I've seen the previous versions but this one is so cool. 5 globes from me. Keep it up!
(If this comment was disrespectful, please report it.)

 
7/31/2003 12:53:56 AM

La Volpe ur the BEST.
(If this comment was disrespectful, please report it.)

 
7/31/2003 10:55:07 AM

Ron Weight. What I normally do is compile the OCX as normal. Add a control from the new OCX to one of the forms with picture boxes then exit out of VB when the save as box appears I unclick the form I changed and save everything else. Load it back up and the project now knows about the updated OCX and the controls use the new version and arnt picture boxes anymore

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

 
8/1/2003 1:23:16 PM

Great, but...GDI memory leaks and Comparing to other Buttons he need lot of memory
(If this comment was disrespectful, please report it.)

 
8/17/2003 2:29:36 AM

Nice work lavolpe!!!! Got 5 whole globes from me. =)
(If this comment was disrespectful, please report it.)

 
8/20/2003 9:08:52 PM

Good~~
좋아요 ...좋아
(If this comment was disrespectful, please report it.)

 
9/10/2003 11:26:06 PMKen Mullins

This has huge GDI memory leaks and will crash a program if used alot.

Put 20 buttons on a form and call it through a do loop. After about 100 refreshes the GDI maxes out past 9000+ and the program crashes.
(If this comment was disrespectful, please report it.)

 
9/11/2003 2:27:23 AMKen Mullins

Don't get me wrong or anything I think your buttons look great and the effort and understanding behind the logic of the code is impressive. However they do have major resource leaks and therefore can't be used in a commercial app.

Also and more importantly you are actually using goto's and gosub's in your code! I thought this was actually against the law now?!

Does anyone look at the source or test it before voting?



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

 
9/11/2003 8:20:34 AMdoofus

Hey Ken Mullins --- great observations; but if you really want your criticism to be constructive, perhaps you could suggest some solution(s) to the problem you point out?
(If this comment was disrespectful, please report it.)

 
9/11/2003 8:49:21 PMLaVolpe

Ken, criticism a bit rough, but if it's true, then I need to take a look. Per my reply I'll test it again tomorrow & if you could send the info I requested, I'd sure appreciate it. Thanx.
(If this comment was disrespectful, please report it.)

 
9/12/2003 12:31:46 PMKen Mullins

My apologies, I did not intend my comments to offend. I think the code, logic and knowledge shown by LaVolpe is excellent. I do however feel too many users take code such as this and use it without investigating and learning from it. Just a little wake up call to say "Read, Understand and Learn"

As to the problem;
After discussion with LaVolpe and some testing it looks like the problem is in the GetGDIMetrics sub

remove the line:

ButtonDC.OldFont = SelectObject(ButtonDC.hDC, CreateFontIndirect(newFont))

or for that matter the entire "Font" case branch.

Happy coding and well done LaVolpe as this is an excellent control.
(If this comment was disrespectful, please report it.)

 
9/12/2003 1:13:05 PMLaVolpe

Please do NOT remove the line or section suggested by Ken. Without that, your buttons are limited to one font style--that of the parent container. He is correct that there is a leak & it is associated with the GetGDIMetrics routine. But the real culprit is 2 calls to that routine: Remove the lines from both the ReadProperties & InitProperties routines. I will upload the fix later today when I get home. Ken thanx for your sharp eye & assistance.
(If this comment was disrespectful, please report it.)

 
9/12/2003 2:01:56 PMLaVolpe

Had a few minutes during lunch. Patch now included in this zip.
(If this comment was disrespectful, please report it.)

 
10/31/2003 2:02:18 AM

What about Office XP Style? I'm still waiting for this button style from you for long time. And still continue waiting...

Happy to you!

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

 
11/20/2003 11:17:18 AM

Excellent stuff!! We love it!
(If this comment was disrespectful, please report it.)

 
1/2/2004 6:55:41 PMLuke H.

Lavolpe you rule.
It must have taken pure genius to fix all those leaks in the Chameleon button. (over 100 orphaned GDI objects just by running the sample and closing it immediately. This with all of the "fixes" as of 1/2/04) No wonder you had to rewrite the whole thing. VB needs more coders such as yourself.
(If this comment was disrespectful, please report it.)

 
1/6/2004 8:09:45 PMLaVolpe

Mr.Level offered a good suggestion & I will leave it up to you to include: a FontSize property to easily change it during runtime. Simply add your own
Public Property Let FontSize(vSize As Single)
Then do a cursory sanity check to ensure fontsize is acceptable (ie., not negative, not too small, not too big and not = UserControl.Font.Size)
After that, simply set UserControl.Font.Size=vSize and call the same 3 functions found in "Public Set Property Font()"
(If this comment was disrespectful, please report it.)

 
1/7/2004 7:30:12 PM

Hey LaVolpe,
Going by the screenshot, it sure seems impressive, especially the custom & diagonal/oval buttons. I will be testing it extensively at home in a day or two, since I need a good button for my upcoming projects. Will keep u posted with suggestions (and bug reports, if any ;-). One question: Was it based on the Chameleon button initially ?
(If this comment was disrespectful, please report it.)

 
1/12/2004 7:54:25 PM

Keith, I tested the button as well as I could. No bugs (atleast as far I know). It's going into my next VB project (with due credits to u of course ;-). Very well commented code, overall a commendable effort. Just add the Office XP & Transparent button styles and it would in GodMode ! How far has the Vertical version proceeded ? Best of luck !!
(If this comment was disrespectful, please report it.)

 
1/18/2004 1:55:06 AMHamed Oveisi

Dear LaVolpe
Nice Work! But I want to ask you add an XP style for the Hover style (Just like what you can see on IE 6 and other MS Toolbars on XP).
Also you can check if user use a Theme or not on XP:

Private Declare Function IsThemeActive Lib "uxtheme.dll" () As Boolean

So you can create the best and most complete VB Button that can changes its style on XP windows same as MS controls.

Again, Well Done!
(If this comment was disrespectful, please report it.)

 
1/21/2004 8:55:51 AMLaVolpe

Requests for more XP-like button styles or capabilities. No. I do not have XP & cannot see the how those styles react to individual mouse click states; nor can I test XP-only functions like the themes. Sorry. Don't let that stop you from giving it a shot though. The XP style currently provided was the result of asking other coders to send me snap shots. I don't want to rely on others to create code & therefore repsectfully bow out on any future XP-related additions until I get XP (I don't forsee that happening).
(If this comment was disrespectful, please report it.)

 
1/27/2004 12:35:36 AM

i use your code in my multi million project
thanks
i want to purchase your code
(If this comment was disrespectful, please report it.)

 
2/9/2004 3:21:14 PM

Do you have a web site? By the way this code rulez! Made my little App 10 times nicer =] - Thank you for sharing, Rom
(If this comment was disrespectful, please report it.)

 
2/20/2004 3:58:00 AM

When I placed a button (compiled as
OCX) on my user control, this return an
error. So, in the readproperties
routine, i have replaced the
line:
curBackColor = .ReadProperty("cBack", Parent.BackColor)
with following line:
curBackColor = .ReadProperty("cBack", cParentBC)
Is it correct?
5 globes,excellent work :D
(If this comment was disrespectful, please report it.)

 
2/20/2004 12:19:21 PMLaVolpe

The above scenario (usercontrol in usercontrol) is being addressed off-line. Should this result in a code change, I will post it here. Check the Last Update statement at end of project description above.
(If this comment was disrespectful, please report it.)

 
2/23/2004 2:26:25 AM

Great would be a complete understatement! Thanks for sharing this control! I hope you don't mind if i use it in one of my projects coz without it, my app would be duuulllll. Keep it up! :)
(If this comment was disrespectful, please report it.)

 
2/23/2004 9:07:11 AMLaVolpe

Thanx to Deigo for pointing out a small bug. Usercontrol in Usercontrol produces non-specific error. The offending line is in the ReadProperites
routine: Change
curBackColor = .ReadProperty("cBack", Parent.BackColor) to curBackColor = .ReadProperty("cBack", vbButtonFace)
(If this comment was disrespectful, please report it.)

 
2/26/2004 3:52:05 AM

I hant tried this program..but i think this is nice..tanx for making this planet equipt with knowledge..contribute more code for the learning porposes..tanx...
(If this comment was disrespectful, please report it.)

 
4/7/2004 5:02:49 PMVivek

Hi Keith,

I've been using this button for quite some time now. Thanks ! But I haven't seen any updates since past few months. When is the Vertical version forthcoming ? Please don't tell us that you have stopped working on this project. Keep up the good work, and keep updating this project, atleast for the sake of us lesser mortals. :-)
(If this comment was disrespectful, please report it.)

 
4/12/2004 7:27:56 AM

Hi there,

Great Coding dude!!!

I just looked into the caption related code and found there is some problem with it. Its with the Access Keys related code.

1) Once set the access keys can't be removed. That is if i change the caption of the button at runtime, and for the new caption i do not want any access key then also the button uses the old access key.
2) If i set a caption like
(If this comment was disrespectful, please report it.)

 
4/12/2004 7:38:42 AM

Dim sTmp As String
Dim lPos As Long

sTmp = Replace$(m_sCaption, "&&", Chr$(1))

lPos = InStrRev(sTmp, "&")
If lPos Then
AccessKeys = Mid$(sTmp, lPos + 1, 1)
Else
AccessKeys = "" 'must reset the access key (this is what is missing in the present version)
End If
sTmp=""
(If this comment was disrespectful, please report it.)

 
4/12/2004 7:40:21 AM

i've tested it with some wierd captions... still if u find any bug pls inform me too...

Neeraj Agrawal
neerajishere@yahoo.com
(If this comment was disrespectful, please report it.)

 
4/12/2004 10:27:36 AMLaVolpe

neerajishere, thanx & caught during a rewrite (to be released in May if all goes OK). The suggested change would work for this posting.
(If this comment was disrespectful, please report it.)

 
4/26/2004 10:06:56 AM

Can't download code. Everytime I go to extract the zip the file is empty when it opens. Such a shame as these buttons look like the best I've seen and the reviews are excellent.
(If this comment was disrespectful, please report it.)

 
4/26/2004 2:47:43 PMLaVolpe

When this happens, choose to SAVE the zip file vs OPEN the zip file. Then open the zip after it is saved & virus checked.
(If this comment was disrespectful, please report it.)

 
5/17/2004 11:47:33 PMxeons

Man this button control is by far the best one on the entire earth, has so many options, and it add's a pleasing appearance to any application.
(If this comment was disrespectful, please report it.)

 
5/21/2004 12:13:00 AM

You're great man.!! Superb
(If this comment was disrespectful, please report it.)

 
6/3/2004 9:50:40 AMtamari670

This looks great, After testing I hope to be using it in a project I am working on (of couse eith full credit to you). I got to this from another project I downloaded, where the programmer made sure to give credit to you.

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

 
6/3/2004 5:31:26 PMLaVolpe

New Release Update: Everytime I think I'm about to put together the pieces & post it, something else comes up & usually it's a new idea. The upcoming version will have vertical button & text too, new geometic shapes including 6 diagonal variations, animated gif capability, will use less memory & several other options/improvements. Hopefully it will be ready in 1st two weeks of July.
(If this comment was disrespectful, please report it.)

 
6/5/2004 2:42:41 PM

Outstanding code + Great learning tool = 5 Globules!
All VB tests were successful, but inserting into Word/Excel/MS Access generates Runtime Error -2147467259 (80004005): Unspecified error. Not sure why other owner drawn controls are working. Have you experienced this problem?
(If this comment was disrespectful, please report it.)

 
6/8/2004 9:38:45 AMLaVolpe

Tell you the truth, never thought about using the buttons in non-exes. However, I'm pretty sure the problem is when I try to reference Usercontrol.Parent properties when the parent doesn't have those properties. I would suggest adding an "On Error Resume Next" in the UserControl_InitProperties routine, recompile the OCX, and that should get you past those unexecpected errors. I'll address the problem in the next release.
(If this comment was disrespectful, please report it.)

 
7/2/2004 3:39:02 PM

Excellant Code! 5 globes! BTW, If using the XP Style button, is there a way to disable the orange MouseOver border? I like it but with my color scheme it throws it way off.
(If this comment was disrespectful, please report it.)

 
7/14/2004 12:49:44 AM

1) Great control.
2) Is there a way to change the backcolor of a button when it is clicked and is in checkbox mode. It seems to always be a grey but wasn't sure if it was possible to set the color somehow to a different color.
(If this comment was disrespectful, please report it.)

 
7/27/2004 1:29:15 PM

I was told by the good folk over at vbcity.com to contact you for help. Maybe you can help me out.

It seems I can not set the Picture property of a Lavolpe button at runtime. Am I doing something wrong or is this how it should work?

The following code causes a runtime error:

lavolpeButton1.Picture = LoadPicture(
(If this comment was disrespectful, please report it.)

 
7/27/2004 1:29:54 PM

I was told by the good folk over at vbcity.com to contact you for help. Maybe you can help me out.

It seems I can not set the Picture property of a Lavolpe button at runtime. Am I doing something wrong or is this how it should work?

The following code causes a runtime error:

lavolpeButton1.Picture = LoadPicture("C:\mypic.jpg")


PS: I want to offer the user the ability to change a button's picture property during runtime as a way of "Skinning" my application.

If the LaVolpe button does not allow loding a picture during runtime would it be possible to add this functionality.

Anxiously awaiting your reply,
UncleT (uncletr2@bellsouth.net)
(If this comment was disrespectful, please report it.)

 
8/1/2004 7:21:33 PM

Strange issue here. I add the button with the XP theme, rectangular and diagonal, when I save, the buttons turn flat and have diagonal lines crossing the buttons. The properties of the buttons disappear. I then run the code and they look and act as should. Stop the run and they look normal in design time. And I'm also unable to add new buttons. They return to windows default and the properties delete. I have to re-add them. Then they disappear again. I'm not a programmer, but know enough that this should not be. Maybe I loaded it incorrectly? I just added the .ctl and module in my code. The .ctl button shows up in my tool bar as a regurlar button, but in your program, it has a fox's head. Is there an OCX I can add?
(If this comment was disrespectful, please report it.)

 
8/7/2004 5:40:05 AM

Can you please send me the LVButton.ocx? ok?

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

 
8/12/2004 4:57:14 PM

can u send me the ocx also?
(If this comment was disrespectful, please report it.)

 
8/16/2004 12:40:22 PMLaVolpe

For those asking for an OCX? Simply compile the usercontrol (in the zip file) as an OCX.
(If this comment was disrespectful, please report it.)

 
9/7/2004 5:21:21 PMBlessedMan

I saw alot about an update, but havent seen anything to date of the update with the vertical buttons :). If you are still planning another update can I suggest maybe a non click option. So you can use your button as a nice looking and theme based label.
(If this comment was disrespectful, please report it.)

 
9/14/2004 11:09:02 PMTony G

Hey%2C+great+button+the+best+I%27ve+seen%2E+I+did+some+testing+in+Win9x+and+found+an+err or%2C+error+reads%3B+%2E%2E%2E+caused+an+error+in+ole32%2Edll%2C+invalid+page+fault%2E%0D%0AIt+happe ns+when+exiting+the+application%2E+So+I+think+the+cleanup+code+is+missing+something%2E%0D%0AAny+idea s%3F
(If this comment was disrespectful, please report it.)

 
9/15/2004 7:51:15 AMTony G

You can delete the 2 above.
When used as an OCX in Windows 98 I get error in ole32.dll invalid page
fault but only when exiting. When I then include it as a user control in the app I get an out of memory error, hate to be the bearer of bad news because the button is great. But sounds like a memory leak somewhere.
(If this comment was disrespectful, please report it.)

 
9/21/2004 6:57:57 AM

Lvbuttons doesn't included caption orientation, i dissapointed. please updated lvbuttons included caption orientation (horizontal/vertical90/vertical 180)
(If this comment was disrespectful, please report it.)

 
10/13/2004 12:48:50 PMLaVolpe

Been meaning to finalize the update, but real-life job changes & personal tragedies have put my "fun time" on the back burner. I don't expect to post anything new for the next couple months at least. Sorry folks
(If this comment was disrespectful, please report it.)

 
10/26/2004 1:36:25 PM

Is it possible to load an icon to the button from a resource file using LoadResPicture ? When I'm trying to run the following LVButton1.Picture = LoadResPicture(101,vbResIcon) I get an error. Any help ?
(If this comment was disrespectful, please report it.)

 
10/27/2004 9:37:45 AMLaVolpe

When assigning a picutre property to a button, use the keyword SET... Set LVButton1.Picture =LoadResPicture(101,vbResIcon)

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

 
11/4/2004 3:48:13 AM

I love your button control. However, when applied together with Neeraj Agarwal's XTab control, there seems to be a problem displaying rounded buttons. It displays an ugly rectangular mask once we click the tab and return to original tab.
(If this comment was disrespectful, please report it.)

 
11/9/2004 6:18:22 PM

Good job man !
(If this comment was disrespectful, please report it.)

 
11/12/2004 11:16:37 AM

Every time i play the project and close it, the lavolpe's buttons does not have all the properties and does not show properly. I need to close the form and open it again. This happened with your old release too. I think it is an incompatibility with some references of my project, because in a new project works fine.
(If this comment was disrespectful, please report it.)

 
11/15/2004 8:16:26 AM

I found the bug!
When I have a Data Environtment in my project, happens what I said up here (and I have to close and reopen the window in design mode).
If there are not a Data Environtment, the button works fine.
(If this comment was disrespectful, please report it.)

 
1/13/2005 12:58:11 PMBroken Arrow

M$ AntiSpyAdWare finds a trojan in the OCX version!!!
(If this comment was disrespectful, please report it.)

 
1/13/2005 6:16:26 PMLaVolpe

The trojan: not from this project. It was a distributed compiled OCX from some other coder/application.
(If this comment was disrespectful, please report it.)

 
2/7/2005 9:55:49 PM

Keith, Your work is Magnum Opus.
Hoping you can do it with Listbox, Combo Box, etc. (XP, Java, etc. style)
Thanks!
For sharing your knowledge.
(If this comment was disrespectful, please report it.)

 
2/10/2005 5:20:12 AMPeter Kind

Excellent work. In an earlier post, the question about a .net version was raised. I didnt see a reply to that question so i ask it again. Do you plan for a .net version somewhere in the near future.
(If this comment was disrespectful, please report it.)

 
2/17/2005 10:20:28 PMNerdley Noodleslicer

Awesome. I get depressed when I read your code. At least I'm a better programmer than my cat (maybe). ;-) I'm gonna extract just the XP portion to play with for now. Thanks.

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

 
2/23/2005 11:41:18 PM

I already include the entire modLvTimer.bas module in one of many projects which has error like "Class LVbuttons.LaVolpeButton of control cmdLog was not a loaded control class" something like that. My question is there any other thing I should do in order to make the projects run without error related to LVbuttons.ocx.
(If this comment was disrespectful, please report it.)

 
2/24/2005 12:02:41 AMLaVolpe

Above answered offline. Basically; it goes like this: 1) if compiling as separate ocx, then ocx project has usercontrol & module and the project that uses the ocx must not contain the module, 2) if compiling into your project the project has your forms, usercontrol & module.
(If this comment was disrespectful, please report it.)

 
3/2/2005 11:53:14 AM

Fantastic work. I've amended your control to allow 40x40 and 48x48 picture sizes as well. Is there any way that I can have a button with a transparent background? I want to be able to show my nicely gradient-filled form underneath the button :)
(If this comment was disrespectful, please report it.)

 
3/7/2005 9:08:00 AMAlpha

wonderful! 5*
(If this comment was disrespectful, please report it.)

 
4/11/2005 3:48:11 PM

Good job my friend, but I can큧 use shortcuts because this control is blocking the "keydown event" on the form. What do we can do ?
(If this comment was disrespectful, please report it.)

 
4/11/2005 5:17:52 PMLaVolpe

^^ answered offline. Believe a conflict in shortcut keys w/other controls is the culprit. If a bug, then will post a fix.
(If this comment was disrespectful, please report it.)

 
4/11/2005 5:21:16 PMLaVolpe

Error noted: "...was not a loaded control class". This happens when trying to add an existing form from another project with the usercontrol embedded into it. No idea why except that usercontrol is expected to be compiled. Work around is to copy the form & frx file to new project, search & replace the .frm file in NotePad replacing the old ProjectName with new ProjectName. Then it works fine.
(If this comment was disrespectful, please report it.)

 
4/12/2005 8:06:50 AM

Sorry, I was wrong. In fact I was trying use arrows (-> <-) like shortcut. The others keys work fine.

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

 
4/22/2005 12:29:42 AM

Hi LaVolpe,

Have you release new version with Office XP Style, Office 2003 Style? (Those style are very hot today). If yes, could you send me that new version?

Happy to you!

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

 
4/27/2005 10:39:18 AM

I used the ocx with my exe app in a machine without vb only runtime. When I run app, the controls are not visible until i move the mouse over them (where logically there are) then they appears.... is it a bug?
(If this comment was disrespectful, please report it.)

 
5/2/2005 8:28:37 PM

Can I include your LaVolpe Button and LaVolpe submenu code in a program I intend to sell for revenue. I'm going to acknowledge your contribution in the about form of my program.
(If this comment was disrespectful, please report it.)

 
5/16/2005 9:19:58 AMChennai Guru

Really nice job by La Volpe.
But a small bug I've noticed for your attention.
If I change the font property of the lvButton during run time, it doesn't behave as expected.

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

 
5/24/2005 10:26:59 AM

In the "mode" proportie is missing the
option the option "dropdown" as in the status bar control. Is it possible ?

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

 
5/25/2005 11:20:07 AMLaVolpe

^^ Answered offline. Think user wants an OLEdropMode option; not sure.
(If this comment was disrespectful, please report it.)

 
6/6/2005 8:42:04 PMJeff Mayes

I have enjoyed all of your projects, but especially the buttons! I have just one small proble. I cannot use the AnimateWindow API with any form containing a LaVolpe button (I always use the gradients, have not tried without the gradient) as the buttons do not re-draw correctly. Can you provide any help with this?
(If this comment was disrespectful, please report it.)

 
7/27/2005 4:51:34 PMthe hawk

When trying to use the buttons I get the following: Line 91: Class LVbuttons.LaVolpeButton of control but_gen_rpt was not a loaded control class.
This occurs for each and every FRM I have.
Can anyone show me the way out of this?
(If this comment was disrespectful, please report it.)

 
7/27/2005 11:30:47 PMLaVolpe

For anyone who is using an app they downloaded from PSC or elsewhere that may be using my buttons... If they don't give you the OCX, write them & pretty much demand it. There is no telling what changes were made when they compiled that OCX. Simply downloading this version and having it work would be pure luck IMO.
(If this comment was disrespectful, please report it.)

 
8/26/2005 9:22:15 PMKnoxster

I have used your control to put XP style diagonal buttons in my app, however whenever I mouse over them I get a "Variable not defined" error, which takes me to the line: "SetTimer UserControl.hwnd, 237, 50, AddressOf lv_TimerCallBack", and has AddressOf lv_TimerCallBack highlighted.... I can't figure out what to do to get rid of this error. Please help me
(If this comment was disrespectful, please report it.)

 
8/26/2005 9:29:27 PMKnoxster

I figured it out... sorry.
(If this comment was disrespectful, please report it.)

 
8/26/2005 10:08:07 PMLaVolpe

^^Answered off line. Probably missing the modLVtimer.bas file.
(If this comment was disrespectful, please report it.)

 
10/6/2005 5:21:37 AMTuanHai

Mising .... Office XP Button Style Lavope oi. :))

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

 
10/7/2005 7:36:05 AMDATCC

Hi LaVolpe,
Great button, but I have a problem. When I try to use it in my UserControl (I'm adding picture box and adding your button also to the usercontrol) it's not working. I tried both compiled version and the source code, but the same. What can be the problem?
(If this comment was disrespectful, please report it.)

 
10/22/2005 10:18:14 AMalex

hi author,
may i know how to compile the control to lvbutton.ocx so that can use it in other application. it is very popular, and many app refer to it
(If this comment was disrespectful, please report it.)

 
10/28/2005 6:31:00 PMJeff Mayes

As always, you are the bomb! A quick question, how do I change the color for true value if mode is optionbutton?
(If this comment was disrespectful, please report it.)

 
11/17/2005 12:12:58 AM

So can this control be used in applications that are sold for profit?
(If this comment was disrespectful, please report it.)

 
12/8/2005 5:43:30 PMBrommers

Hello La Volpe :)

I'm using your button in an app of mine and to date have had no problems whatsoever.

I've just added a button to a large form and saved my work. Upon reloading it I'm getting a 'Date property called 'Font' not found' Run Time error 327 and the program refuses to run.

The program stops in debug mode at the line

Set UserControl.Font = .ReadProperty("Font")

in the User Control/Read Property Sub.

I've tried everything I can think of...do you got any idea what I've done wrong here?

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

 
2/7/2006 10:22:47 AMLaVolpe

^^ troubleshot off line
(If this comment was disrespectful, please report it.)

 
2/24/2006 2:13:36 AMMansoor

The best GUI code . I give you 5 globes a 5 thousand times
(If this comment was disrespectful, please report it.)

 
3/17/2006 3:23:42 PMChris

This is excellent! I've been playing around with it for the past couple of days and it works great, but unfortunately I now have the same problem as Brommers when using this control on an application with a lot of forms, modules, etc (Date property called 'Font' not found' Run Time error 327).

If I comment out the line "Set UserControl.Font = .ReadProperty("Font")", then it works without error messages, but I can only use one Font (Times New Roman).

Is there a solution for this? Thanks.
(If this comment was disrespectful, please report it.)

 
4/28/2006 9:01:44 AMPhilip Zac

hi, is there any possiblity to add a shadow or a rect around the control when showrect properity set to false...for xp button its ok...(blue line around when got focused)i hope u understand what i mean
(If this comment was disrespectful, please report it.)

 
4/28/2006 11:38:38 AMLaVolpe

Previous two ^^ discussed off-line.
(If this comment was disrespectful, please report it.)

 
5/31/2006 6:28:55 PMMike Ulik

Set UserControl.Font = .ReadProperty("Font") Gives me an error message also. Beautiful button control. Works fine in your demo but not in my program. I don't know enough about user controls to fix the problem. Bedt button I have seen yet.

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

 
6/2/2006 12:15:03 AMLaVolpe

Patched as of this date. Prev d/l: change line to:
Set UserControl.Font = .ReadProperty("Font", UserControl.Font)
(If this comment was disrespectful, please report it.)

 
6/2/2006 11:39:20 AMGoober Mpc

Very nice...

Especially like the diagonal buttons, will come in handy in some of my projects.

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

 
6/2/2006 5:05:28 PMJeff Mayes

I was having the same problem as the others, when using numerous buttons in regard to the font property. I also stopped using this for another problem I was having. When adding a new button to a form with multiple buttons already there, if I change the button name, then ALL of your buttons get set to minimal properties and will cause the app to crash. Colors are gone, fonts are gone, etc.
(If this comment was disrespectful, please report it.)

 
6/2/2006 5:14:27 PMChris

Thanks for the update, LaVolpe.
Works fine now :-)
(If this comment was disrespectful, please report it.)

 
6/2/2006 7:24:39 PMLaVolpe

Jeff, sorry to hear that. The only issue I know of is using a multitude of buttons may cause problems. That's part of the learning process I guess. If I were to rewrite that control, it would be far less memory/GDI intensive. But for an app displaying say less than 50 or so, it should still work fine. I've learned tons since I put that control out almost 5 years ago (v1.0).
(If this comment was disrespectful, please report it.)

 
6/2/2006 9:01:52 PMJeff Mayes

I have watched yourwork for years, as you know Keith. And you nailed it, I do have more than 50 buttons in my program. It's HUGE. Tha's exactly what I was talking about. Thank you.
(If this comment was disrespectful, please report it.)

 
6/3/2006 12:08:00 AMTuanHai

Why not add one more style "Office XP" and Unicode support? We are waiting for your upgrade.
(If this comment was disrespectful, please report it.)

 
6/4/2006 5:13:31 PMRichard Mewett

LaVolpe - its to your credit that you still maintain and respond to issues with this project given the vast array or newer (and very succesful) submissions you have. You are a great example of what PSC should be all about.
(If this comment was disrespectful, please report it.)

 
7/28/2006 8:22:50 AM_Merlin_

Keith, I have some doubts as to the 50 or more buttons. I have a project with 168 (!) forms in it. Some of these forms have only 2 buttons but most of them have 8 to 20 buttons on them. So if you add all these buttons there are many more than 50 in the project. No problem whatsoever. So this means your button control is very stable. Maybe the problem should be looked for elsewhere. Some combination of controls that interfere with the LaVolpe buttons maybe? I must add that I compiled the control into an ocx. Might be a reason of the wellfunctioning. I really like this control. Only thing I regret is it doesn't support themes. But since you do not further expand on this control, I guess I will have to live with that ;)
I hope that one of these days you come out with a new of your superb controls. Keep on coding...

Merlin is the name, and logic is my game...
(If this comment was disrespectful, please report it.)

 
9/30/2006 1:52:35 AMMohammed Sayed

Just a little idea , if you have time make a separate controls for each type , so it will be smaller and easily used without creating an OCX.

5G for your amazing work.
(If this comment was disrespectful, please report it.)

 
11/10/2006 11:18:34 PMTuanHai


So many button controls in PSC but the most one I believed is LaVolpe button. This button is scalable but there is not enough button styles for modern UI today (like dcButton does). However, I hope the author will continue this project.
(If this comment was disrespectful, please report it.)

 
11/19/2006 6:50:34 PMHector

Really liked this control LaVolpe, your whole work is amazing (well, your experience in Basic is as long as my age heh).

However, I've found some problems with the picture colour when button is disabled... two examples:

1.- Buttonstyle: Hover, Backcolor: &H00808080&, Picture used: Exc XP system icon (32x32@24bpp).

http://img83.imageshack.us/img83/651/clipboard01hx0.png

2.- Buttonstyle: XP, Backcolor: Button Face, Picture used: used an icon got elsewhere (16x16@24bpp), although this happens on a lot of icons out there).

http://img295.imageshack.us/img295/4070/clipboard02uk0.png

Has anyone here tried tweaking how the control draws the picture when disabled? Really liked this control, and I'm already using it on a big project with a lot of forms and buttons.
(If this comment was disrespectful, please report it.)

 
12/1/2006 8:07:13 PMGuido Grandi

Your ctl is very excellent!!! In vb6 I had no problems at all. I'd like to use the ocx in vb.net but I had some trouble (it seems with the handle of a windowsless control). Can you kindly give me some help? Thank you in advance for your help. Best regards
Guido
(If this comment was disrespectful, please report it.)

 
12/6/2006 12:00:05 AMNITIN

Control is very excellent!!.
A small bug is that In case of option Button each array of buttons must have separate container. Means On the same form/Frame we can not use two array/set of option buttons. Why?
(If this comment was disrespectful, please report it.)

 
12/8/2006 6:33:30 AMNITIN

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

 
12/13/2006 5:08:07 PMhsanguino

when i attach the control into project and i try to compile, i get Variable not defined Error, at line: eSetTimer UserControl.hwnd, 237, 50, AddressOf lv_TimerCallBack, what can i do? help please
(If this comment was disrespectful, please report it.)

 
12/13/2006 7:27:54 PMLaVolpe

NITIN. Replied off line
hsanquino: simply missing the modLVtimer module.
(If this comment was disrespectful, please report it.)

 
3/18/2007 2:24:26 AMtoni

wew my first comment in pscode..nice job
(If this comment was disrespectful, please report it.)

 
4/18/2007 6:26:13 PMDavid Ross Goben

Just letting you know I gave this 5 @@@@@. I have been using this control for some time, but had extracted it from another project someone else wrote on PSC. Today I finally took a look at the control's toobox icon, and realized who had written it 8O).
(If this comment was disrespectful, please report it.)

 
8/14/2007 9:11:26 PMJason Newland

This is about the best custom button control I've ever seen to date, and as always LaVolpe, well done. Although, it would be nice if you would properly "tab" your code so it's readable lol, but none the less 5 globes
(If this comment was disrespectful, please report it.)

 
11/25/2007 6:34:41 AMkibe

Do not work "changing" picture, if property ButtonShape = lv_Rectangular. If ButtonShape = lv_Rounded, this code:
lvButtons1(Index).DelayDrawing True
If OnButton Then
lvButtons1(Index).BackColor = vbCyan
Set lvButtons1(Index).Picture = Image1(0)
Else
lvButtons1(Index).BackColor = &HC000C0
Set lvButtons1(Index).Picture = Image1(1)
End If
lvButtons1(Index).DelayDrawing False
End Select
working. What to do with lv_Rectangle?
(If this comment was disrespectful, please report it.)

 
3/14/2008 1:14:09 PMJeff Mayes

Bug report: if you have a button, XP style, with picture, and set captionalign to left, the button auto resets captionalign to center when loading form (both ide and compiled)
(If this comment was disrespectful, please report it.)

 
3/14/2008 4:48:48 PMLaVolpe

Jeff, good catch. Within the usercontrol's WriteProperties event. Change similar line to:
.WriteProperty "CapAlign", myProps.bCaptionAlign, 2
(If this comment was disrespectful, please report it.)

 
5/6/2008 8:28:00 PMaura

i am used it for along time but i have problem for some computer that i install using lvbuttons.ocx it cant running, it has error :run-time error 459 object or class does not support the set of events" the title is lvbutton. if i replace lv button with standart button its tunning well.. any body can help me please....
(If this comment was disrespectful, please report it.)

 
12/5/2008 12:10:41 PMAndre

Lavolpe, This Very Good Control !

1- Does it have any new version of the usercontrol, with all the corrections that you were suggesting here?

2- BUG: Because when one clicks on this button, and a modal form is opened on him does the clicked button disappear? Does not if I to change the focus erases before calling the modal form that happen, why?

3- Does it have as it will shape the color of the edge of the button style XP, like you did with the class cBorder? It wanted to exchange the black color of the edge for a tone of blue.

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

 
3/13/2009 10:32:10 AMSnehasish Nanda

extract setup.zip file first and run setup.bat that will
Register lvbutton.ocx file was not extracted. please send setup.bat
(If this comment was disrespectful, please report it.)

 
8/28/2009 9:12:48 AMemmanuel

it work but perfectly in window xp
pls hw can i make work with visier
mailto:emmanuelh74@yahoo.co.uk
(If this comment was disrespectful, please report it.)

 
1/5/2010 10:17:37 AMausty

love your work... your buttons rocks!! but i have a problem when putting diagonal button in sstab.. when change in other tab then go back..the edges of diagonal button appear how can i fix it.. i hope you still read your comments
(If this comment was disrespectful, please report it.)

 
3/17/2011 8:08:19 AMAbhisak Kumar Jain

Good evening sir,
Your Button Is very good, it is amazing.
when add button on form and change button style, then error "variable not found" is coming, please solve this problem,
Thanking you
Abhisak Jain
abhiindia.jain@gmail.com
00919992929888
(If this comment was disrespectful, please report it.)

 
1/4/2012 3:19:24 PMDaniel

Even this control could seem obsolete or dusty in 2012, La Volpe remains a great italian programmer who shares his VB experience with love while others make similar things for money...We have to recognize that in our VB world he is a master. I wonder, how many persons in this world created in VB6 an ImageList control that supports PNG format ?...I don't know many - maybe excepting Steve McMahon, who was a pioneer. Our respect La Volpe ! Grazie!
(If this comment was disrespectful, please report it.)

 
3/29/2012 2:19:55 PMRajneesh Anand

Great use of Visual Basic. Great job buddy...keep improving..
(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.