   [.net] C# resize/lost device issues/questions
  Hiya, thanks for reading this.  The basic issue is that when a window gets resized all of the graphics go nuts.OK, there's only a million articles on this out there...they all basically say the same thing..."When a window resizes the DirectX device becomes lost...blah blah blah"My question is...If I try to capture a lost device exception like this, in my Render() function:  try { Swap.Present(); }  catch (DeviceLostException) { deviceLost = true; Debug.WriteLine("Device was lost");  }I never catch the DeviceLostException, even after a resize.  AND, if I try to handle the lost device event like this:device.DeviceLost += new EventHandler(OnDeviceLost);protected void OnDeviceLost(object sender, EventArgs e){// Clean up}Again, the code never hits, even after a resize.  It DOES hit when I exit the app.SO...what's the deal here?  DOES the device become lost after a resize, and if so, why can't I seem to handle it?FYI: The above code was culled from these two articles:http://www.riemers.net/eng/Tutorials/DirectX/Csharp/ShortTuts/lost_device.phphttp://www.pluralsight.com/wiki/default.aspx/Craig.DirectX/DeviceRecoveryTutorial.htmlTHANKS    
  No, the device isn't lost when the window is resized. You need to capture the resize event and recalculate your projection matrix. That should fix the wierdness you're seeing.