예제 #1
0
        private void ShowHiddenWindow(int?width, int?height, int?top, int?left, System.Windows.Forms.FormWindowState windowState)
        {
            HiddenWindow            = new HiddenForm();
            HiddenWindow.Load      += HiddenWindow_Load;
            HiddenWindow.Activated += HiddenWindow_Activated;

            if (left.HasValue || top.HasValue)
            {
                HiddenWindow.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            }

            if (top.HasValue)
            {
                HiddenWindow.Top = top.Value;
            }
            if (left.HasValue)
            {
                HiddenWindow.Left = left.Value;
            }
            if (width.HasValue)
            {
                HiddenWindow.Width = width.Value;
            }
            if (height.HasValue)
            {
                HiddenWindow.Height = height.Value;
            }

            HiddenWindow.WindowState = windowState;

            HiddenWindow.Show();

            System.Windows.Threading.Dispatcher.Run();
        }
예제 #2
0
        private void ShowHiddenWindow(int? width, int? height, int? top, int? left, System.Windows.Forms.FormWindowState windowState)
        {
            HiddenWindow = new HiddenForm();
            HiddenWindow.Load += HiddenWindow_Load;
            HiddenWindow.Activated += HiddenWindow_Activated;

            if (left.HasValue || top.HasValue)
            {
                HiddenWindow.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            }

            if (top.HasValue)
            {
                HiddenWindow.Top = top.Value;
            }
            if (left.HasValue)
            {
                HiddenWindow.Left = left.Value;
            }
            if (width.HasValue)
            {
                HiddenWindow.Width = width.Value;
            }
            if (height.HasValue)
            {
                HiddenWindow.Height = height.Value;
            }

            HiddenWindow.WindowState = windowState;

            HiddenWindow.Show();

            System.Windows.Threading.Dispatcher.Run();
        }