|
-
Jul 17th, 2000, 01:28 PM
#1
I am making a program, in which I need a blinking tray icon.
I know how to place the tray Icon, I just dont know how to blink it,
sure I could keep Adding it and Removing it in a continuous loop, but I think that would steal quite alot of resources.
If somebody could help me, I would greatly appreciate it.
Thank You in advance
-
Jul 17th, 2000, 01:48 PM
#2
Fanatic Member
Please refer to:
http://forums.vb-world.net/showthrea...threadid=22924
It just basicly sets a timer to have an icon for a sec and then take it away and does it over and over.
Gl,
D!m
-
Jul 17th, 2000, 08:26 PM
#3
is there any way I can do this without a timer?
-
Jul 17th, 2000, 08:36 PM
#4
Fanatic Member
I'm not sure...you can make it blink REALY fast by refreshing it constantly..or setting the icon = "" then icon = "file.ico"
But using a timer would be best.
You might want to ask the API experts for something in that area that would do that.
Gl,
D!m
-
Jul 17th, 2000, 08:37 PM
#5
Of course there is a way...no Timer required.
This is a way using the Do...Loop event.
Code:
Function timeout(interval)
Current = Timer
Do While Timer - Current < Val(interval)
DoEvents
Loop
End Function
'Timeout is optional..it is used to control speed..without it, it blinks very fast
'code
Form1.Icon = icon1.Picture
Do: DoEvents
icon1.Visible = Not icon1.Visible
timeout 0.1
Loop
Hope that helps.
-
Jul 17th, 2000, 08:41 PM
#6
Hyperactive Member
Um, in case you didn't noticed Dim
He said
sure I could keep Adding it and Removing it in a continuous loop, but I think that would steal quite alot of resources.
so putting a Timer would just end up using about 3-4% of the CPU.
You could manage it by loading an animated gif into the tray, although that'd be very advanced code,
may I suggest instead of blinking, to put an icon with easy noticeable colors and/or fluorescent colors instead.
Signed, Rodik ([email protected])
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Jul 17th, 2000, 08:47 PM
#7
Oh yeah, and if you want to stop the blinking...
-
Jul 18th, 2000, 09:25 AM
#8
thanks to everybody, but so far no luck,
I used fox's demo to load the trayicon, and I used a timer to keep switching between icons, but the icon kept deleting itself before loading the other one, so the taskbar kept flickering....
very NOT desirable....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|