if (openMxdDialog.ShowDialog() == DialogResult.OK) { pathMXD = openMxdDialog.FileName; if (pathMXD != null) { if (axMapC.CheckMxFile(pathMXD)) { threadProgress = new Thread (new ParameterizedThreadStart(showProgress)); threadProgress.Start(); axMapC.LoadMxFile(pathMXD); } } }