Link to home
Start Free TrialLog in
Avatar of justchat_1
justchat_1

asked on

Graphical button for vb

I need a button that I can edit the source to or that supports unicode so that I dont have to.  Its only real requirement is that it needs to follow the operating systems visual styles.  On xp it should look like an xp button and on vista it should look like a vista button.
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Check in here. You have allot of examples:

http://www.codeproject.com/buttonctrl/
Hi!

I think this is good, some other controls in it too:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=68734&lngWId=1 

Matti
Avatar of justchat_1
justchat_1

ASKER

I need buttons that will work with a manifest file or something similar.  Those buttons only look like xp.
jpaulino those were C++ controls
Yes, but some of then you could use in vb
Could you give an example because I couldnt find one?
none of those are for for vb6 but i looked into converting them but they dont support the vista style either
>> none of those are for for vb6

I didn't understoud that you like to VB6
Don't know if it as something but try in http://www.vbaccelerator.com/
Been there already couldnt find anything....you would think that since every other control has been recreated this would be easy to find
ASKER CERTIFIED SOLUTION
Avatar of Dana Seaman
Dana Seaman
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forgot to mention ucThemedButton does not require a manifest file since it is rendered direct from UxTheme.dll.
Its not rendering correctly for me.  Only the top and left side of the button render, the right and bottom sides appear clipped.   Text is also not visible even though a caption was set.
Set these UserControl parameters:

ScaleMode = vbPixels
AutoRedraw = True
BorderStyle= None
One note:
In order to use the control I had to add an hWnd property.

Also:
lPtr = StrPtr(DecodeUTF8(m_Caption))
Should Read:
lPtr = StrPtr(m_Caption) 'the decode function actually breaks unicode support
Also:
'the decode function actually breaks unicode support
DecodeUTF8(m_Caption) allowed you to set the caption as UTF-8 at design time and it will render as UTF-16 at run-time.
Using lPtr = StrPtr(m_Caption) means that you will have to set the caption at run-time since the IDE properties window will not accept unicode..
true...but if i need that then i will replace it with a function that detects utf-8 or utf-16 so that both are properly rendered