Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm new to this slimDX world (and posting on stackoverflow) as well and ran across your question based on the same problem. I know this is VB and you're using C#, but I've had success with this, note you'll need your original windowed mode description:</p> <pre><code>Private Sub Form_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.Alt And e.KeyCode = Keys.Enter Then Dim isFull As Boolean swapChain.GetFullScreenState(isFull, Nothing) swapChain.SetFullScreenState(Not isFull, Nothing) swapChain.ResizeTarget(swapChainDescription.ModeDescription) End If End Sub </code></pre> <p>I'm not a C# programmer, but here's my take at it:</p> <pre><code>form.KeyDown += (o, e) =&gt; { bool Full; swapChain.GetFullScreenState(out Full, Null); swapChain.SetFullScreenState(!Full, Null); swapChain.ResizeTarget(swapChainDescription.ModeDescription); } </code></pre> <p>Hopefully someone will come along and correct me if I'm wrong or you can help.</p> <p>Basically, if I understand this correctly, it's not looking for the description of the mode it's already in, which you've done. You've gotten, ThisOut and passed ThisOut and ThisOut contains a fullscreen flag, based on the nature of the SetFullScreenState method. While it's SlimDX, it's all really MS DX, so here's the reference:</p> <p><a href="http://msdn.microsoft.com/en-us/library/bb174579%28v=vs.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb174579%28v=vs.85%29.aspx</a></p> <p>Follow the links inside the article to discover more.</p> <p>Note that you're supposed to pass Null if you're not going fullscreen. You've passed something other than Null... the existing render target to be exact. The existing render target has now been set to fullscreen. Passing Null (or Nothing because it's VB) as the function intends works just fine. By taking my original, windowed, description and re-passing the mode, which is windowed and not fullscreen, everything works out like it should.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload