VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Coolbutton

Dave Hng  (4 Submissions)   Custom Controls/Forms/Menus   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

It's a coolbutton. :) Those flat things that MS uses now.
This one supports setting images for mouse over, mouse down, mouse up, drawing bevels for those 3 states, setting the colours of the bevel, automatically generating the mousedown and mouseup images by varying the brightness of the original, setting text positioning... lots of stuff.

Assumes
Sometimes it doesn't update automatically, like when you enter text, sometimes the text won't be renedered. Update the usercontrol, or reload the form to resolve the change.

Side Effects
Warning! If you do use this code, either use the activex control, or switch on compile on demand! If you ever come up with an error message that reads something like VB cannot read a temp file, close VB immediately without saving, and load it up again. Seems there's as glitch in VB, if you write code that pops up an error, and you use a usercontrol that needs to execute to work, VB can loose project data! Be extremely cautious about this! (I have compiled it to an activex control, and stuck it in a zip file if anyone wants to be safe) Tooltips don't work with this control too, due to the way it works.

API Declarations
(see code below)

Rate Coolbutton (3(3 Vote))
Coolbutton.bas

Coolbutton Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters