Windows Forms toolTip forever using C#

2019-09-15 08:02发布

How do I set a toolTip that doesn't go away as long as you're hovering on the control?

I tried setting the "AutoPopDelay" to 999999, but the tooltip disappears after 15 seconds.

Or, is there another way to achieve the same effect?

1条回答
劫难
2楼-- · 2019-09-15 08:11

From MSDN:

There are multiple delay values that you can set for a Windows Forms ToolTip component. The unit of measure for all these properties is milliseconds. The InitialDelay property determines how long the user must point at the associated control for the ToolTip string to appear. The ReshowDelay property sets the number of milliseconds it takes for subsequent ToolTip strings to appear as the mouse moves from one ToolTip-associated control to another. The AutoPopDelay property determines the length of time the ToolTip string is shown. You can set these values individually, or by setting the value of the AutomaticDelay property; the other delay properties are set based on the value assigned to the AutomaticDelay property. For example, when AutomaticDelay is set to a value N, InitialDelay is set to N, ReshowDelay is set to the value of AutomaticDelay divided by five (or N/5), and AutoPopDelay is set to a value that is five times the value of the AutomaticDelay property (or 5N).

For more information on this subject, look here:

查看更多
登录 后发表回答