开发者

C# ToolTip on MDI Client

开发者 https://www.devze.com 2022-12-14 19:08 出处:网络
I\'m maintaining an application that shows a toolTip in certain conditions on a userControl. (When the mouse is over some area a timer starts, when it stops, and the mouse is still there, the toolTip

I'm maintaining an application that shows a toolTip in certain conditions on a userControl. (When the mouse is over some area a timer starts, when it stops, and the mouse is still there, the toolTip displays a text, by calling "Show(..)". This works fine. A different applicatiion is holding this app as an MdiClient. The toolTip now only shows when the application is not active: If the user opens a different applicat开发者_JAVA技巧ion on the computer, "WORD" for example, and then returns to mine without clicking on it, holding the mouse on the right region, then the text is displayed. Otherwise, although the "Show" is called, the "Popup" event is never raised. Does anyone have an idea about how to solve this? Thanks, Tali.


If I've understood the problem correctly, I think what you need to do is track when the window (which will show the tooltip) loses and gains focus. So when it loses focus, disable showing tooltips, then enable when it gains focus.

0

精彩评论

暂无评论...
验证码 换一张
取 消