NotifyIcon

  • Thread starter Thread starter mick
  • Start date Start date
M

mick

Whenever I hover over the mouse pointer over a notifyicon I want it to
display a dynamic value (via notifyicon.text ). I`m altering the
notifyicon.Text within a timer event. Problem is it only shows the initial
value (it doesnt update). Is what I`m trying actually possible?

mick
 
Mark Rae said:
Is there a reason that you have not included your code with your post...?

If you do that, people will be able to help you...

Well this is the timer event -

private void timer3_Tick(object sender, EventArgs e)
{
Random random = new Random();
int num = random.Next();
notifyIcon1.Text = num.ToString();
}

mick
 
Mark Rae said:
Is there a reason that you have not included your code with your post...?

If you do that, people will be able to help you...

Well this is the timer event -

private void timer3_Tick(object sender, EventArgs e)
{
Random random = new Random();
int num = random.Next();
notifyIcon1.Text = num.ToString();
}

mick
 
mick said:
Yeah.


Well this is the timer event -

private void timer3_Tick(object sender, EventArgs e)
{
Random random = new Random();
int num = random.Next();
notifyIcon1.Text = num.ToString();
}

Worked for me.

Whats the timer frequency? If you use the default 100ms, maybe you are
overwhelming the message queue? Try 1000 ms (1 sec) it worked for me.

--
 
mick said:
Yeah.


Well this is the timer event -

private void timer3_Tick(object sender, EventArgs e)
{
Random random = new Random();
int num = random.Next();
notifyIcon1.Text = num.ToString();
}

Worked for me.

Whats the timer frequency? If you use the default 100ms, maybe you are
overwhelming the message queue? Try 1000 ms (1 sec) it worked for me.

--
 
Mark Rae said:
OK, so how are you starting the timer? Are you sure that it's even
running...?

Yes Ive set it to run from the designer:-) It`s definately running - if I
hold the mouse over the icon it shows a number like it should. If I then
move the mouse away and then back over the icon again it shows a different
number. What it wont do is display the changing numbers live as it were.

mick
 
Mark Rae said:
OK, so how are you starting the timer? Are you sure that it's even
running...?

Yes Ive set it to run from the designer:-) It`s definately running - if I
hold the mouse over the icon it shows a number like it should. If I then
move the mouse away and then back over the icon again it shows a different
number. What it wont do is display the changing numbers live as it were.

mick
 
Mike said:
Good:)


Worked for me.

Whats the timer frequency? If you use the default 100ms, maybe you are
overwhelming the message queue? Try 1000 ms (1 sec) it worked for me.

Yes it was set to 100 originally but changing the value doesnt make any
difference.

mick
 
Mike said:
Good:)


Worked for me.

Whats the timer frequency? If you use the default 100ms, maybe you are
overwhelming the message queue? Try 1000 ms (1 sec) it worked for me.

Yes it was set to 100 originally but changing the value doesnt make any
difference.

mick
 
mick said:
Yes it was set to 100 originally but changing the value doesnt make any
difference.

And your test is to hover over the tray icon and you expect to see a
changing random text (number)?

Thats the behavior I got.

Last week, I worked on a C/C+ MFC port to a .NET component combining
NotifyIcon, Timer and a ContextMenu control into one component. I
needed a state based hovering text (starting, running, backing up,
packing mail, stopping, etc) and precise balloon tip popup timeouts
that didn't rely on a human being at the keyboard or mouse activity
occurring which is how the default Balloon Tip timer works.

So I was interesting in your post to see if I would have a problem
when the text change frequency was higher. I would think there would
a minimum frequency before the message queue may get bogged down and
begin to see some gui drag (besides it being a waste since the mouse
over event is probably 0.5 to 1 sec wait time anyway before it shows
anything).

So it sounds like something else is affecting the tray behavior.

Divide and conquer, Go Vanilla :-)

--
 
mick said:
Yes it was set to 100 originally but changing the value doesnt make any
difference.

And your test is to hover over the tray icon and you expect to see a
changing random text (number)?

Thats the behavior I got.

Last week, I worked on a C/C+ MFC port to a .NET component combining
NotifyIcon, Timer and a ContextMenu control into one component. I
needed a state based hovering text (starting, running, backing up,
packing mail, stopping, etc) and precise balloon tip popup timeouts
that didn't rely on a human being at the keyboard or mouse activity
occurring which is how the default Balloon Tip timer works.

So I was interesting in your post to see if I would have a problem
when the text change frequency was higher. I would think there would
a minimum frequency before the message queue may get bogged down and
begin to see some gui drag (besides it being a waste since the mouse
over event is probably 0.5 to 1 sec wait time anyway before it shows
anything).

So it sounds like something else is affecting the tray behavior.

Divide and conquer, Go Vanilla :-)

--
 
Back
Top