March 29, 2017

How to minimize and maximize in C#.Net?

You have to set the forms WindowState property something like this:
In Windows Forms:
private void button1_Click(object sender, EventArgs e)
{
    this.WindowState = FormWindowState.Minimized;
}
In WPF:
private void button1_Click(object sender, RoutedEventArgs e)
{
    this.WindowState = WindowState.Minimized;
}

No comments:

Post a Comment