如何处理Form.MaximumBox单击

Rom*_*man 1 c# forms windows winforms

大家!当用户在窗口中单击maximumBox时,我需要跟踪事件.有可能的?

Pra*_*ana 5

试试这个:使用WindowState属性

   private void  Form1_Resize(object sender, EventArgs e)
   {
       if (this.WindowState == FormWindowState.Maximized)
       {
           \\ code to execute after Maximize button has been clicked
           MessageBox.Show(this.WindowState.ToString());

       }
   }
Run Code Online (Sandbox Code Playgroud)