jmanson's picture

Window disappears returning from full screen

I added the following code to toggle full screen mode.

            Keyboard.KeyDown += delegate(object sender, KeyboardKeyEventArgs e)
                if (e.Key == Key.Escape)
                if (e.Key == Key.Enter)
                    if (this.WindowState == WindowState.Fullscreen)
                        this.WindowState = WindowState.Normal;
                        this.WindowState = WindowState.Fullscreen;

Pressing enter once seems to make the window full screen. It does not seem to change the monitor resolution though (how would I do that?). However, pressing enter a second time to make the program display in a window again does not work. The console is left open, but the display window completely disappears. It does not even show up in the task bar any more. I pulled this code out of one of the examples included with the source code.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
c2woody's picture

The window is correctly shown whe you compile the svn release 1.0 branch (current development version) of OpenTK.