I was trying to make a quick 5 minute app to remind me to do something
before leaving work - just have the dialog appear which showed in the
quicklaunch bar.
The application hung (which was unfortunate as I had set it as a startup
and had some difficulty deleting the link with the CPU at 100%)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Warn5 {
public partial class Form1 : Form {
DateTime p = new DateTime(2008, 1, 1, 17, 0, 0);
public Form1() {
InitializeComponent();
while (DateTime.Now p)
p.AddDays(1);
}
private void timer1_Tick(object sender, EventArgs e) {
if (DateTime.Now p) {
this.WindowState = FormWindowState.Normal;
this.BringToFront();
while (DateTime.Now p)
p.AddDays(1);
}
}
private void notifyIcon1_MouseDoubleClick(object sender,
MouseEventArgs e) {
this.WindowState = FormWindowState.Normal;
}
}
}
--
Alex Taylor