} //WriteMessageRange

        private void FinishProgressWin(ProgressWin progressWin)
        {
            progressWin.SetButtonState(true);
            if (progressWin.ShouldShowHorizontalScrollBar)
            {
                progressWin.ResultOutput.HorizontalScrollbar = true;
            }

            progressWin.BringToFront();
            progressWin.SetButtonFocus();
        } //FinishProgressWin
        } //EnsureVersionLoaded

        private ProgressWin StartProgressWin(bool isCreating, string sharePointVersion)
        {
            ProgressWin progressWin = new ProgressWin();

            progressWin.FormClosed += new FormClosedEventHandler(DestroyForm);
            progressWin.MdiParent   = this;
            progressWin.TopMost     = true;
            if (isCreating)
            {
                progressWin.Text = "Creating provisioning template from " + sharePointVersion;
            }
            else
            {
                progressWin.Text = "Applying provisioning template to " + sharePointVersion;
            }

            progressWin.SetStatusBarText = SetStatusBarText;
            progressWin.SetButtonState(false);
            progressWin.Show();
            Application.DoEvents();
            return(progressWin);
        } //StartProgressWin