开发者

New message pop up window on background c#

开发者 https://www.devze.com 2023-02-06 22:11 出处:网络
I need a pop up window that will be displayed on the bottom right side of the screen. It\'s supposed to pop when a new message is received within my software.开发者_如何学C

I need a pop up window that will be displayed on the bottom right side of the screen. It's supposed to pop when a new message is received within my software.开发者_如何学C How can i program it? Create new form and use it? How can I program it to run on background without interrupting other user actions?

Thanks.


Check out NotifyIcon.ShowBalloonTip. And here's an example.

Basically, you add a NotifiyIcon to your form, and do something like this (from the MSDN page linked above):

void Form1_DoubleClick(object sender, EventArgs e)
{
    notifyIcon1.Visible = true;
    notifyIcon1.ShowBalloonTip(20000, "Information", "This is the text",
        ToolTipIcon.Info );
}


You can use NotifyIcon class and its method ShowBalloonTip(Int32, String, String, ToolTipIcon)

0

精彩评论

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