How to maximize a window in background?

前端 未结 3 599
天命终不由人
天命终不由人 2021-01-26 11:05

I need to maximize a window in background, meaning without activating (focusing) it. SetWindowPlacement function doesn\'t offer this.. Any ideas?

        WINDOWP         


        
3条回答
  •  萌比男神i
    2021-01-26 11:54

    Please use the below code at the time of windows load

        private void Form1_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
    
        }
    

    This will maximise your window

提交回复
热议问题