Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML2 .Net - Methods for minimizing & maximizing window  (Read 1404 times)

0 Members and 1 Guest are viewing this topic.

Cence99

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML2 .Net - Methods for minimizing & maximizing window
« 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. :)

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML2 .Net - Methods for minimizing & maximizing window
« Reply #1 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.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Cence99

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML2 .Net - Methods for minimizing & maximizing window
« Reply #2 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.

Cence99

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML2 .Net - Methods for minimizing & maximizing window
« Reply #3 on: April 19, 2014, 10:47:27 pm »
Nevermind, I found "ShowWindowAsync". Thanks a lot!