By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

Delay for buttons

P: 9
Hello , i've got a question : How do you make those mouse over buttons in Visual Basic 6.0 with a delay ?
I want them to look like this .

The buttons come a few (small)seconds later so they have a delay .
When Its in down state , it shouldn't do a thing untill the mouse is released.
So does someone know how to do the delay thingy ?
You can download the program and see it for yourself , but I made a vid , so it would be easier .
(in .mov and .avi )
This is the program:
http://www.ovenfreshweb.com/audio-player-maker.htm
These are the vids:
Buttons : Quickplayer Or Buttons : Windows media player

(By the way : Source written ones :) )
Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim OrigColor As Long
  3. Private Sub Form_Load()
  4.     OrigColor = Command1.BackColor
  5.     End Sub
  6. Private Sub Command1_Click()
  7.       Command1.BackColor = vbRed
  8. End Sub
Sep 16 '07 #1
Share this Question
Share on Google+
6 Replies


VBPhilly
P: 95
Hello , i've got a question : How do you make those mouse over buttons in Visual Basic 6.0 with a delay ?
I want them to look like this .

The buttons come a few (small)seconds later so they have a delay .
When Its in down state , it shouldn't do a thing untill the mouse is released.
So does someone know how to do the delay thingy ?
You can download the program and see it for yourself , but I made a vid , so it would be easier .
(in .mov and .avi )
This is the program:
http://www.ovenfreshweb.com/audio-player-maker.htm
These are the vids:
Buttons : Quickplayer Or Buttons : Windows media player

(By the way : Source written ones :) )
Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim OrigColor As Long
  3. Private Sub Form_Load()
  4.     OrigColor = Command1.BackColor
  5.     End Sub
  6. Private Sub Command1_Click()
  7.       Command1.BackColor = vbRed
  8. End Sub
I had to do this once. Pain in the rump it was.

You should code the mouse enter, mouse exit events. and, if supported, mouse hover events of the buttons.

the problem with this is speed. if the user moves their mouse too quickly, the events (either mouse enter or mouse exit) may not trip.

in such a case, you should code complimentary events in other controls to make sure your buttons are not 'stuck' when mouse-overed. Example: the forms mouse move events should make sure the buttons are not colored as if the mouse were over them.
Sep 16 '07 #2

Expert 5K+
P: 8,434
I'm not sure of the look you're after (can't look at the links, as my work system blocks everything). But have a look at this thread which was about adding "XP-Style orange buttons" to a VB6 program. I have a feeling it covers something like what you're looking for.
Sep 17 '07 #3

P: 9
I found out that it wasn't a delay , but it was just slowly showing the picture .
for an exemple , look at this site , everything comes up slowlyyyyyyyyy...
http://www.morrowland.com/apron/tut_html.php

Anyone gots an idea how to let an image appear slowly?
Sep 17 '07 #4

P: 9
(Has to be in the same tab or else , you just select somthing on the page )
Sep 17 '07 #5

Expert 5K+
P: 8,434
... Anyone gots an idea how to let an image appear slowly?
That's easy! Use a dial-up connection. :)
Sep 17 '07 #6

P: 9
haha ^o)
the second image flows into the first
Sep 18 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.