简体   繁体   中英

How to open a minimized form in c#

So right now I'm currently working on a bot for discord in c#. And I want to have a command were if I do that command and if my form is minimized. I want it to make the form pop up in it's default size. So basically I just want to know how to make a form appear in it's default size if it's minimized. Thx!

public void Bot_MessageReceived(object sender, MessageEventArgs e)
{
    if (e.Message.Text == "Command Here")
    {
        //Open the minimized form here
    }
}

You can set your form's WindowState property :

this.WindowState = FormWindowState.Normal;

Via this property you can control whether your form should be minimized, maximized, or of its normal size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM