1

I've implemented the following (as mentioned here) to return to the Aero-look of the window. Though it doesn't make sense that the Windows Forms assembly is needed for solving this. (Since it does have the Aero-look to begin with.)

System.Windows.Forms.Application.VisualStyleState = System.Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled;

(Implementing System.Windows.Forms.Application.EnableVisualStyles(); didn't work. Mentioned here .) But though I get the Aero-look - I lose the Application-icon.

Before fullscreen:

enter image description here

After fullscreen:

enter image description here

How do I get the icon back?

(I'm using Windows 7 64 bit. And using graphics.ToggleFullScreen(); in the Draw method.)

Community
  • 1
  • 1
ispiro
  • 26,556
  • 38
  • 136
  • 291
  • Do you run/debug instance from VS or do you start it as stand-alone by running the exe-file? You probably never have an icon when debugging from VS – Daniel MesSer Jun 07 '13 at 10:36
  • @DanielMesSer From VS. And yes, before posting I checked and _do_ have an icon before going fullscreen. – ispiro Jun 07 '13 at 10:49
  • @DanielMesSer I also tried, now, as a standalone. Same result. – ispiro Jun 07 '13 at 10:52

1 Answers1

0

Solved it.

System.Windows.Forms.Form MyGameForm = (System.Windows.Forms.Form)System.Windows.Forms.Form.FromHandle(Window.Handle);
MyGameForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
ispiro
  • 26,556
  • 38
  • 136
  • 291