@@ -56,29 +56,6 @@ private IntPtr LowLevelMouseProc(int nCode, IntPtr wParam, IntPtr lParam) {
5656 return CallNextHookEx ( mouseHook , nCode , wParam , lParam ) ;
5757 }
5858
59- private bool TransitionsForceDisabled {
60- get {
61- int attributeValue = 0 ;
62-
63- int err = DwmGetWindowAttribute ( Handle , DWMWINDOWATTRIBUTE . DWMWA_TRANSITIONS_FORCEDISABLED , out attributeValue , ( uint ) Marshal . SizeOf ( typeof ( int ) ) ) ;
64-
65- if ( err != S_OK ) {
66- Marshal . ThrowExceptionForHR ( err ) ;
67- }
68- return ( attributeValue != 0 ) ? true : false ;
69- }
70-
71- set {
72- int attributeValue = value ? 1 : 0 ;
73-
74- int err = DwmSetWindowAttribute ( Handle , DWMWINDOWATTRIBUTE . DWMWA_TRANSITIONS_FORCEDISABLED , ref attributeValue , ( uint ) Marshal . SizeOf ( typeof ( int ) ) ) ;
75-
76- if ( err != S_OK ) {
77- Marshal . ThrowExceptionForHR ( err ) ;
78- }
79- }
80- }
81-
8259 private const int FULLSCREEN_EXIT_LABEL_TIMER_TIME = 2500 ;
8360
8461 private System . Windows . Forms . Timer exitFullscreenLabelTimer = null ;
@@ -108,7 +85,6 @@ private bool ExitFullscreenLabelTimer {
10885 }
10986
11087 private bool fullscreen = false ;
111- private bool fullscreenTransitionsForceDisabled = false ;
11288 private FormBorderStyle fullscreenFormBorderStyle = FormBorderStyle . Sizable ;
11389 private FormWindowState fullscreenWindowState = FormWindowState . Maximized ;
11490 private Point fullscreenLocation ;
@@ -146,14 +122,6 @@ public bool Fullscreen {
146122 closableWebBrowserLocation = closableWebBrowser . Location ;
147123 closableWebBrowserSize = closableWebBrowser . Size ;
148124
149- try {
150- fullscreenTransitionsForceDisabled = TransitionsForceDisabled ;
151- TransitionsForceDisabled = true ;
152- } catch {
153- // no Aero!
154- fullscreenTransitionsForceDisabled = false ;
155- }
156-
157125 // need to do this first to have an effect if starting maximized
158126 WindowState = FormWindowState . Normal ;
159127 // disable resizing
@@ -211,12 +179,6 @@ public bool Fullscreen {
211179
212180 // commit by bringing the window to the front
213181 BringToFront ( ) ;
214-
215- try {
216- TransitionsForceDisabled = fullscreenTransitionsForceDisabled ;
217- } catch {
218- // no Aero!
219- }
220182 }
221183 }
222184 }
0 commit comments