Search code examples
formsminimizemaximizeopentk

Remove minimize/maximize buttons from window, OpenTK


I need to disable/remove the minimize and maximize buttons in window form. I don't know how to access the form from my OpenTK.GameWindow, any help is appreciated.


Solution

  • This is deceptively easy:

    WindowBorder = WindowBorder.Hidden;
    

    GameWindow does not use WinForms, it p/invokes the underlying platform directly (performance!)

    Edit: or do you mean keep the close button but remove minimize/maximize? The closest to this is:

    WindowBorder = WindowBorder.Fixed;