SFML community forums

Help => Window => Topic started by: Cence99 on April 19, 2014, 10:15:56 pm

Title: SFML2 .Net - Methods for minimizing & maximizing window
Post by: Cence99 on April 19, 2014, 10:15:56 pm
Hi!

I am working with SFML2 .Net in C# (Visual Studio 2013).

I set the window Styles to "None" and created a custom titlebar with RectangleShapes, Sprites etc.
I added Sprites in the top-right corner acting as buttons, which need to be able to minimize, maximize and close the RenderWindow.

The problem is, that there are no methods for minimizing or maximizing the window. >:(
I read SFML is not a good windowing API, but these features are essential for my application (no game).
Is there any workaround in the WinAPI or anything I can do?

I hope somebody can push me in the right direction!
Thank you for reading. :)
Title: Re: SFML2 .Net - Methods for minimizing & maximizing window
Post by: zsbzsb on April 19, 2014, 10:36:55 pm
Well if you absolutely need this feature you could always host SFML on a WinForms form/window. Or you could use Win32 functions to do what you want.
Title: Re: SFML2 .Net - Methods for minimizing & maximizing window
Post by: Cence99 on April 19, 2014, 10:39:47 pm
Thanks for the quick answer! Do you know which Win32 function could minimize /maximize a RenderWindow in C#? If not, I'll eventually go with the WinForm solution.
Title: Re: SFML2 .Net - Methods for minimizing & maximizing window
Post by: Cence99 on April 19, 2014, 10:47:27 pm
Nevermind, I found "ShowWindowAsync". Thanks a lot!