How to do own code to add the display time of ToolTip?

Y

YXQ

Hello, seem the AutoPopDelay property of ToolTip dose not work well, the
display time is short. And i google internet but not find better way. How to
write the own code to add the display time of ToolTip? or keep to show until
mouse left the item. Thank you very much
 
K

kimiraikkonen

Hello, seem the AutoPopDelay property of ToolTip dose not work well, the
display time is short. And i google internet but not find better way. Howto
write the own code to add the display time of ToolTip? or keep to show until
mouse left the item. Thank you very much

Though AutoPopDelay property is said that it cannot handle more than
5000 ms in MSDN link below, i can set more than 5000 ms for that
property without any warning in .NET 2.0. (eg: set 10000 ms in .NET
2.0, it may work)

That page doesn't have a .NET 2.0 version of that property, maybe that
was the reason of not being limited in 5000 ms.
http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.autopopdelay.aspx

However, regardless of that property, if you want to show tooltip
while mouse pointer is on a control during specified duration, you can
extend the duration by using Tooltip.Show() method by specifying a
custom duration like on a button control as follows:

' See third argument, extend to 10000 or whatever you wish
ToolTip1.Show("Hello World", Button1, 10000)

See different overloads of Show method here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.show.aspx

Hope this helps,

Onur Güzel
(e-mail address removed)
(e-mail address removed)
 
K

kimiraikkonen

Thank you for your reply, but there are lots of control need the tooltip,
have you better way?
Merry Christmas

"kimiraikkonen" <[email protected]>
??????:d029f9ac-2c35-4bd5-baa1-b9bfdd754...@a29g2000pra.googlegroups.com....


Though AutoPopDelay property is said that it cannot handle more than
5000 ms in MSDN link below, i can set more than 5000 ms for that
property without any warning in .NET 2.0. (eg: set 10000 ms in .NET
2.0, it may work)

That page doesn't have a .NET 2.0 version of that property, maybe that
was the reason of not being limited in 5000 ms.http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip....

However, regardless of that property, if you want to show tooltip
while mouse pointer is on a control during specified duration, you can
extend the duration by using Tooltip.Show() method by specifying a
custom duration like on a button control as follows:

' See third argument, extend to 10000 or whatever you wish
ToolTip1.Show("Hello World", Button1, 10000)

See different overloads of Show method here:http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip....

Hope this helps,

Onur Güzel
(e-mail address removed)
(e-mail address removed)

Only one tooltip can be shown at the same time, although you can loop
through all the controls (Me.Controls), when loop is ended, you will
see one tooltip displayed on one control. You can test, place multiple
controls on form, eg: Checkbox, Button, Combobox...When you loop
through all the controls on form and when loop reaches the end, one
tooltip will be displayed on one control, although other tooltips
actually were shown while loop was being executed:

'That demonstrates what i mean
For Each ctrl As Control In Me.Controls
ToolTip1.Show("Hello World", ctrl, 10000)
Next


Onur Güzel
(e-mail address removed)
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top