Click here to Skip to main content
15,900,258 members

Comments by Mathsquare (Top 5 by date)

Mathsquare 31-Dec-11 18:38pm View    
??? I don't get it
Mathsquare 11-Dec-11 0:45am View    
Thanks but can you make it so it will keep the font Style.
Mathsquare 11-Dec-11 0:33am View    
don't work
Mathsquare 29-Nov-11 22:44pm View    
Vb.net
Mathsquare 17-Sep-11 21:34pm View    
Deleted
hay
Collapse | Copy Code
private void frmMain_Move(object sender, EventArgs e)
{
if (MousePosition.X < 20)
{
this.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width / 2, Screen.PrimaryScreen.WorkingArea.Height);
this.Location = new Point(0, 0);
}
if (MousePosition.X > Screen.PrimaryScreen.WorkingArea.Width - 20)
{
this.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width / 2, Screen.PrimaryScreen.WorkingArea.Height);
this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width / 2), 0);
}
if (MousePosition.Y < 20)
{
this.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height / 2);
this.Location = new Point(0, 0);
}
if (MousePosition.Y > Screen.PrimaryScreen.WorkingArea.Height - 20)
{
this.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height / 2);
this.Location = new Point(0, (Screen.PrimaryScreen.WorkingArea.Height / 2) - 20);
}
}

if the taskbar is on the right.