private void SaveKMLFile() { SaveFileDialog SFDlg = new SaveFileDialog(); SFDlg.Filter = "KML File (*.kml)|*.kml"; if (SFDlg.ShowDialog() == DialogResult.OK) { //ProgressBar Application.DoEvents(); this.Cursor = Cursors.WaitCursor; string aFile = SFDlg.FileName; _currentLayer.SaveAsKMLFile(aFile); //Progressbar this.Cursor = Cursors.Default; } }