“Speech bubble” notifications

后端 未结 4 1121
谎友^
谎友^ 2020-12-19 20:18

I\'m trying to get a notification to pop up something like these bubbles in an MFC application:

4条回答
  •  误落风尘
    2020-12-19 21:03

    You could just use System.Windows.Forms.ToolTip.

    using System.Windows.Forms;
    
    ...
    
    ToolTip myTip = new ToolTip; // create tooltip
    myTip.IsBaloon = true; // give it a round shape
    myTip.SetToolTip( myTool, "You're hovering above myTool." ); // register popup message for 'myTool'
    ...
    myTip.Show(myTool, "Forced modal pop-up.", 1000 ); // display pop up message for 1 sec at 'myTool'
    

提交回复
热议问题