   Showing blocking forms (dialogs) xna
  Hello, I am working on a map maker for an rts I am planning. I'm using xna for it and I have various tools that wopork on my terrain. One of these is a "smooth" tool, it sorta does a gausian blur on the vertices height.My smooth function takes a radius value that it uses. Anyway, to get this value I do this:Select vertices I wish to smooth, press "S" I then pop up a dialog, user enters the radius and clicks ok (or cancel):[source lang =  "c#"]  if (m_SmoothToolDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)  { m_Model.SmoothSelectedVertices((float)m_SmoothToolDialog.Radius);  }The problem I get is that this does not appear to block. It does stay in the ShowDialog untill I click ok or cancel but if I hit S again (then it tries to call Showdialog again and crashed. As if its multi threaded.My call stack goes somehting like this:Game.Update // Game is the class is gave me when I choose to make a new projectKeyBoardEvents.UpdateGame.OnKeyDownController.OnKeyDownController.Smoothmy KeyBoardEvents object just checks for changes in the keyboard state each update and calls a delegate method on key up/on key down.Any idea whats going on? when I put a break point in my Controller.Smooth each time it is in the "Main Thread" So it should be blocking the thread untill my dialog returns but it appears its not.So, what am I missing here?I would like my dialog to steal focus and blockt he thread untill it returns.Any ideas? thanks.   
  Honestly you shouldn't really be using the Game class for a map editor.  The Game class is meant to be a simple framework for games...it's not meant to support an event-driven input model (which is what you commonly use for GUI apps), or to host Controls and Forms.  The WinForms sample on the Creator's Club site provides a much better starting point if you're looking to make an editor or utility.In a typical WinForms app, you handle this by providing an owner Form for your dialog when you show it. When you call ShowDialog and specify an owner Form, that Form gets disabled so that it doesn't receive input events. ;  yeah I saw I could provide an owner but I didn't know how to get the owner form. I'll take a look at the WinForms sample, thanks.   