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
Post a Comment