From f6f945f918028447a1b26f8d5f409727cad5438a Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 12 Jul 2014 03:17:54 +0300 Subject: [PATCH] Fix for rectangle capture staying top of dialogs --- HelpersLib/Forms/ImageViewer.cs | 1 + ShareX/Forms/AfterCaptureForm.Designer.cs | 1 + ShareX/Forms/BeforeUploadForm.Designer.cs | 5 +++-- ShareX/TaskHelpers.cs | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HelpersLib/Forms/ImageViewer.cs b/HelpersLib/Forms/ImageViewer.cs index c1ca59cb1..ce26f88a2 100644 --- a/HelpersLib/Forms/ImageViewer.cs +++ b/HelpersLib/Forms/ImageViewer.cs @@ -138,6 +138,7 @@ private void InitializeComponent() this.DoubleBuffered = true; this.FormBorderStyle = FormBorderStyle.None; this.Text = "ShareX - Image viewer"; + this.TopMost = true; this.WindowState = FormWindowState.Maximized; this.Controls.Add(this.pbPreview); diff --git a/ShareX/Forms/AfterCaptureForm.Designer.cs b/ShareX/Forms/AfterCaptureForm.Designer.cs index 3e1f2b4b3..e435d3eba 100644 --- a/ShareX/Forms/AfterCaptureForm.Designer.cs +++ b/ShareX/Forms/AfterCaptureForm.Designer.cs @@ -174,6 +174,7 @@ private void InitializeComponent() this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "ShareX - Post capture tasks"; + this.TopMost = true; this.tcTasks.ResumeLayout(false); this.tpAfterCapture.ResumeLayout(false); this.tpBeforeUpload.ResumeLayout(false); diff --git a/ShareX/Forms/BeforeUploadForm.Designer.cs b/ShareX/Forms/BeforeUploadForm.Designer.cs index 0d578992b..4669d0f29 100644 --- a/ShareX/Forms/BeforeUploadForm.Designer.cs +++ b/ShareX/Forms/BeforeUploadForm.Designer.cs @@ -88,12 +88,13 @@ private void InitializeComponent() this.Controls.Add(this.btnOK); this.Controls.Add(this.ucBeforeUpload); this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(420, 460); + this.MaximumSize = new System.Drawing.Size(420, 800); this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(420, 420); this.Name = "BeforeUploadForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "ShareX - Dynamic Destinations"; + this.Text = "ShareX - Dynamic destinations"; + this.TopMost = true; this.ResumeLayout(false); } diff --git a/ShareX/TaskHelpers.cs b/ShareX/TaskHelpers.cs index bc2fee343..533a87f02 100644 --- a/ShareX/TaskHelpers.cs +++ b/ShareX/TaskHelpers.cs @@ -310,6 +310,7 @@ public static bool SelectRegion(out Rectangle rect) using (RectangleRegion surface = new RectangleRegion()) { surface.AreaManager.WindowCaptureMode = true; + surface.AreaManager.IncludeControls = true; surface.Prepare(); surface.ShowDialog();