Original Post
Hi
I am new to Managed DirectX programming (C#) and have probably just encountered a newbie problem, but I realy didn't found any solution to it the last 5 hours. So I would be very glad if somebody could help me out.
I implemented a basic fullscreen Direct3D form as it is suggested by many tutorials. But as soon as I switch the application into fullscreen mode, I get the following error message when starting in debug-mode:
Microsoft.DirectX.Direct3D.InvalidCallException: Error in the application.
at Microsoft.DirectX.Direct3D.Device.Reset
at Microsoft.DirectX.Direct3D.Device.OnParentResized
...etc...
As suggested by the sample-code, I regulary call Application.DoEvents() in the main-loop so that windows might handle the event-queues and so on... if I understand this right...
But exactly here is the problem. If I switch off the DoEvents()-call, the application just starts fine in fullscreen mode, but it does not react on key-strokes anymore and I have to shutdown the app by the Task-manager everytime.
Could anybody please help me? I am going to freak out ... :-(
I am new to Managed DirectX programming (C#) and have probably just encountered a newbie problem, but I realy didn't found any solution to it the last 5 hours. So I would be very glad if somebody could help me out.
I implemented a basic fullscreen Direct3D form as it is suggested by many tutorials. But as soon as I switch the application into fullscreen mode, I get the following error message when starting in debug-mode:
Microsoft.DirectX.Direct3D.InvalidCallException: Error in the application.
at Microsoft.DirectX.Direct3D.Device.Reset
at Microsoft.DirectX.Direct3D.Device.OnParentResized
...etc...
As suggested by the sample-code, I regulary call Application.DoEvents() in the main-loop so that windows might handle the event-queues and so on... if I understand this right...
But exactly here is the problem. If I switch off the DoEvents()-call, the application just starts fine in fullscreen mode, but it does not react on key-strokes anymore and I have to shutdown the app by the Task-manager everytime.
Could anybody please help me? I am going to freak out ... :-(