如何显示Windows桌面通知?

时间:2020-10-29 12:37:05

标签: c# winforms

我有一个表单计时器,我想每10秒发送一次通知。我的代码结果是在屏幕上左右弹出一个通知。但是,我希望从Windows桌面窗口获得通知,该窗口位于屏幕的同一点(接近小时和日期)。到目前为止,这是我的代码:

    public int _ticks;

    public NotificationForm()
    {
        InitializeComponent();
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        _ticks++;           

        if ((_ticks % 10) == 0)
        {
            PopupNotifier popup = new PopupNotifier();
            popup.TitleText = "New";
            popup.ContentText = "10 seconds have passed";
            popup.Popup();
        }
    }

enter image description here 我真正需要的是从该位置(Windows本地方式)发出通知:

0 个答案:

没有答案