c# - method to check if form is full screen? -
how write method detects if form full screen or not , if not make full screen? has take place @ form load.
this method works in fullscreentoolstripmenuitem_click event
class fullscreen { public void enterfullscreenmode(form targetform) { targetform.windowstate = formwindowstate.normal; targetform.formborderstyle = formborderstyle.none; targetform.windowstate = formwindowstate.maximized; } public void leavefullscreenmode(form targetform) { targetform.formborderstyle = system.windows.forms.formborderstyle.sizable; targetform.windowstate = formwindowstate.normal; }
}
it possible windowstate
set after load
event , therefore overrides set be, try setting on form.shown event.
Comments
Post a Comment