/// <summary>
        /// Resize the window frame according to one of the provided
        /// scaling factors.
        /// </summary>
        /// <param name="val">
        /// Scale factor for window resizing, which can be one of the
        /// following values [400%, 200%, 100%, 50%, 25%].
        /// </param>
        private void resizeWindow(string val)
        {
            double scale = 0.0;

            switch (val)
            {
            case "400%":
                scale = 4.0;
                break;

            case "200%":
                scale = 2.0;
                break;

            case "100%":
                scale = 1.0;
                break;

            case "  50%":
                scale = 0.5;
                break;

            case "  25%":
                scale = 0.25;
                break;

            default:
                return;
            }

            viewControl.resetWindow();
            locked = true;
            viewControl.scaleWindow(scale);
            this.wndFramePanel.Width  = viewPort.Width + 10;
            this.wndFramePanel.Height = viewPort.Height + 10;
            locked = false;

            if (zoomImgComboBox.SelectedIndex != 3)
            {
                zoomImgComboBox.SelectedIndex = 3;
            }
            else
            {
                viewControl.repaint();
            }
        }