none
C# WinForm Tooltip 如何去除其阴影效果 RRS feed

  • 问题

  • 你好:

         使用C# 开发 WinForm 时使用到Tooltip,但默认显示时有阴影,例如:

         ToolTip tooltip = new ToolTip();

         tooltip .Show("XXX", frm, 0,0);

     

         请教,如何设置才能不显示阴影效果。

         谢谢关注!
                   

      


    Healthy
    2011年9月16日 9:39

答案

  • Hi Healthy,

    欢迎来到MSDN 论坛! 

    1. System.Windows.Forms,我们需要自定义ToolTip控件来达到这一目标。
    2. System.Windows.Controls命名空间下的 ToolTip,可以设置它的属性 HasDropShadow false来去掉阴影。
      请参考下面的链接,以便在Winform应用程序中使用WPF控件:
      http://dotnet.dzone.com/articles/hosting-wpf-controls-winforms?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+zones/dotnet+(.NET+Zone

     

     祝您一切顺利!

    ============================================ 

    Third party disclaimer

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information is found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2011年9月19日 5:24
    版主

全部回复