Is there a simpler way to create a borderless window with XNA 4.0?
- by Cypher
When looking into making my XNA game's window border-less, I found no properties or methods under Game.Window that would provide this, but I did find a window handle to the form.
I was able to accomplish what I wanted by doing this:
IntPtr hWnd = this.Window.Handle;
var control = System.Windows.Forms.Control.FromHandle( hWnd );
var form = control.FindForm();
form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
I don't know why but this feels like a dirty hack. Is there a built-in way to do this in XNA that I'm missing?