我有一个表单计时器,我想每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();
}
}