c# - Can I change the behavior of maximizing a windows form? -


my c# form (visual studio 2008) has advanced mode more bells , whistles (larger form size) , normal mode (smaller form size).

if user clicks on maximize button, i'd form toggle either advanced mode or normal mode, instead of maximizing form itself.

is possible?

i not believe there winforms event triggered maximize button.

last time checked (years ago), can go down winapi level.

protected override void wndproc( ref message m )     {         base.wndproc(ref m); // call overwritten method first         if( m.msg == 0x0112 ) // wm_syscommand         {             if (m.wparam == new intptr( 0xf030 ) ) //window being maximized             {                   // things             }         }     } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -