schenkp
asked on
Programmatically Placing a From
Hi,
How do i Programmatically place a form on the screen? I have a need to place it off center when the program starts?
How do i Programmatically place a form on the screen? I have a need to place it off center when the program starts?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can you show me one with values please....
yeh no problem
button a button on a form and do
private void button1_Click(object sender, EventArgs e)
{
this.Top = 20;
this.Left = 40;
}
button a button on a form and do
private void button1_Click(object sender, EventArgs e)
{
this.Top = 20;
this.Left = 40;
}
You can use the following method:
public static void SetWindowPosition (
int left,
int top
)
this method can only be used in .NET 2 and above