Form.ShowDialog
is a blocking call. This means that until it returns, the code after it won't run (and if that's on the UI thread, your application will appear unresponsive). From the MSDN page:
You can use this method to display a modal dialog box in your application. When this method is called, the code following it is not executed until after the dialog box is closed.
You probably want Form.Show
instead, to get a window without blocking. You haven't described your full use case, but showing something else and closing yourself is a very strange thing to do, guessing there is a better way to solve your problem as well.