Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

MouseOver


juicebox360
 Share

Recommended Posts

Can some please tell me how to use the mouseover, mouseleft, etc in VB6 so I can make some buttons that change colors or "glow" when the mouse is over the button? Also, how do I make buttons that have a picture with the text (sort of like [here](http://www.touchofdeathforums.com/smf/index.php/topic,29217.0.html)? Or is this different?)

I have an idea, but it's rather weird when I think about it…in the background, there is a picture/text in the GUI, and when the mouseover event is activated, a new picture/color "replaces" (overlaps) the one in the GUI. However, I don't know how this would allow a smooth "fading" transition. Or is that impossible...
Link to comment
Share on other sites

That picture idea your describing is a mouseover effect.  You would just add another mouseover effect to the picture and just have it as a colored picture when the word is moused over?  Something like that at any rate. 

And the code for using Mouse Over in Vb6 is…. (Figure it out for yourself)

Hint: Google is your best friend
Link to comment
Share on other sites

Smooth Fading in and out is most likely impossible with the engine (If I'm understanding you correctly)

And yes at one time or another everyone has to look things up :P, Google has been spammed with me looking things up recently ;)
I hope I managed to answer your questions.  If not post again :P
Link to comment
Share on other sites

So…sort of like this?
```
Private OrigColor As Long
Private OrigSize As Integer
Private Sub Form_Load()
    OrigColor = Command1.BackColor
    OrigSize = Command1.Font.Size
End Sub
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, _
    X As Single, Y As Single)
      Command1.BackColor = vbRed
      Command1.Font.Size = 14
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, _
    Y As Single)
        Command1.Font.Size = OrigSize
        Command1.BackColor = OrigColor
End Sub
```
What it does is changes a command button on mouseover, then resets when the mouse is moving on the form.
Of course, the command button is on Graphical for Style. Is this related to what I am supposed to do?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...