I want to show a winform in the very right down corner just above the system tray,
How do I do that? Here is my code:
public static void Notify()
{
Rectangle workingArea = Screen.PrimaryScreen.WorkingArea;
Form fm = new Form();
fm.ClientSize = new Size(200, 200);
int left = workingArea.Width - fm.Width;
int top = workingArea.Height - fm.Height;
fm.Location = new Point(left, top);
fm.ShowInTaskbar = false;
fm.ShowIcon = false;
fm.MinimizeBox = false;
fm.MaximizeBox = false;
fm.FormBorderStyle = FormBorderStyle.FixedToolWindow;
fm.Text = "Test";
fm.TopMost = true;
fm.Show();
}
Show
. Windows Forms does a strange thing where it seems to ignore you when you set theLocation
property before the form's been shown for the first time. – Lengthen