Computer Science Canada

How to create interactive buttons?

Author:  Ashi_Mashi2 [ Thu Apr 21, 2005 8:57 pm ]
Post subject:  How to create interactive buttons?

Hey guys....i want to know how can i create the interactive buttons in VB..like the ones that Win XP uses (turns blue on mouse-over) or the ones in MSN plus..thanks

Author:  Tony [ Fri Apr 22, 2005 8:37 am ]
Post subject: 

I haven't done VB in a long while, but I think in the code window, you select your object from a dropdown in top left, and event from top right (or something like that.

So. myButton -> mouseOver
code:

Sub myButton_mouseOver()
    myBotton.property = value
end


don't forget to change it back when the mouse is no longer over. I don't remember which event that is, but it's there Laughing

Author:  Ashi_Mashi2 [ Fri Apr 22, 2005 5:11 pm ]
Post subject: 

thanks....but, i wanna know if there's any special application/api that would automatically convert the buttons to the cool ones...i dont want to define everything for it;)....thx

Author:  Tony [ Fri Apr 22, 2005 6:13 pm ]
Post subject: 

I donno..

if you use an array of buttons instead, you'd have to define everything just once.

Author:  Brightguy [ Tue Apr 26, 2005 12:10 am ]
Post subject:  Re: How to create interactive buttons?

There's a MouseMove event, but from that alone you can't tell when the cursor has moved off the button. You could use the Form_MouseMove event to tell that, but it's not perfect. Alternatively, you could try the GetCursorPos winAPI function.

If you want all of your buttons to have a special feature, you could start your own ActiveX control and write the necessary code in that, and then use that control in place of the normal command buttons.

Author:  betaflye [ Thu Apr 28, 2005 7:32 pm ]
Post subject: 

http://www.ingenuware.com/ makes some Visual BASIC activex controls which may be helpful to achieve some "flash" to your program. ImpulseStudio 3 has some button controls I find particularly useful and pretty. The timer, multimedia and new form controls are nice, it's particularily expensive though given it's for VB6 only and hasn't been updated in a while.


: