Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

c# Fullscreen Crash

10 views
Skip to first unread message

Therg

unread,
Dec 3, 2009, 9:02:01 AM12/3/09
to
Hello.
I'm writing directx fullscreen application in Studio 2008, language: c#,
platform . Net Frameworkd 3.5, OS: Windows 7.

this code workes fine:

[code]
...
PresentParameters d3dpp = new PresentParameters();

d3dpp.Windowed = true;
d3dpp.EnableAutoDepthStencil = true;
d3dpp.PresentFlag = PresentFlag.LockableBackBuffer;
d3dpp.AutoDepthStencilFormat = DepthFormat.D16;
d3dpp.SwapEffect = SwapEffect.Discard;
d3dpp.BackBufferCount = 1;
d3dpp.BackBufferWidth = Width;
d3dpp.BackBufferHeight = Height;
d3dpp.BackBufferFormat = Format.X8R8G8B8;
d3dpp.PresentationInterval = PresentInterval.Immediate;

try
{
directDevice = new Device(0, DeviceType.Hardware,
renderWindow, flags, d3dpp);
}
...
[/code]
Applicationcorrect render scene.
But if i set d3dpp.Windowed = false it crahed here:
[code]
try
{
Application.Run(new Form1());
}
catch (DirectXException e)
{
MessageBox.Show(e.Message);
}
[/code]
with the message Error in the application
ErrorString = "D3DERR_INVALIDCALL"
ErrorCode = -2005530516

base:
StackTrace = " at
Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[]
presentationParameters)\r\n at
Microsoft.DirectX.Direct3D.Device.OnParentResized(Object sender, EventArgs
e)\r\n at System.Windows.Forms.Control.OnResize(EventArgs e)\r\n at
System.Win...

Then i set Form1 WindowState property to Maximized the program start work
correct, but when alt-tab or win key pressed it crashed again with the same
error.

Chuck Walbourn [MSFT]

unread,
Dec 3, 2009, 5:19:47 PM12/3/09
to
It appears you are using the deprecated Managed DX 1.1 rather than XNA Game
Studio, Windows 7 Code Pack, or other modern solution like the open source
SlimDX. Getting support for the Managed DX 1.1 components is getting more
and more difficult over time. It's not been updated since April 2006.
Windows 7 is not a tested scenario, although neither was Windows Vista.

About the only thing I'd suggest to try is turning on the Direct3D 9 Debug
through the DirectX Control Panel.

--
--
-Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warranties, and confers no rights.

Rolandas

unread,
Dec 11, 2009, 7:40:01 PM12/11/09
to
A lame suggestion. You have to disable Desktop Composition and no more errors.
0 new messages