diff --git a/ShareX/Forms/InspectWindowForm.Designer.cs b/ShareX/Forms/InspectWindowForm.Designer.cs index 53b95504e..367d04e89 100644 --- a/ShareX/Forms/InspectWindowForm.Designer.cs +++ b/ShareX/Forms/InspectWindowForm.Designer.cs @@ -39,10 +39,11 @@ private void InitializeComponent() this.rtbInfo.BorderStyle = System.Windows.Forms.BorderStyle.None; this.rtbInfo.DetectUrls = false; this.rtbInfo.Dock = System.Windows.Forms.DockStyle.Fill; - this.rtbInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.rtbInfo.Location = new System.Drawing.Point(2, 2); + this.rtbInfo.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtbInfo.Location = new System.Drawing.Point(3, 3); this.rtbInfo.Name = "rtbInfo"; - this.rtbInfo.Size = new System.Drawing.Size(666, 514); + this.rtbInfo.ReadOnly = true; + this.rtbInfo.Size = new System.Drawing.Size(664, 512); this.rtbInfo.TabIndex = 0; this.rtbInfo.Text = ""; // @@ -55,7 +56,7 @@ private void InitializeComponent() this.pInfo.Controls.Add(this.rtbInfo); this.pInfo.Location = new System.Drawing.Point(8, 8); this.pInfo.Name = "pInfo"; - this.pInfo.Padding = new System.Windows.Forms.Padding(2); + this.pInfo.Padding = new System.Windows.Forms.Padding(3); this.pInfo.Size = new System.Drawing.Size(672, 520); this.pInfo.TabIndex = 1; // diff --git a/ShareX/Forms/InspectWindowForm.cs b/ShareX/Forms/InspectWindowForm.cs index 2753a98a4..6cc953885 100644 --- a/ShareX/Forms/InspectWindowForm.cs +++ b/ShareX/Forms/InspectWindowForm.cs @@ -76,16 +76,23 @@ private void UpdateWindowInfo() if (SelectedWindow != null) { - rtbInfo.SetFontBold(); - rtbInfo.AppendText("Handle: "); - rtbInfo.SetFontRegular(); - rtbInfo.AppendLine(SelectedWindow.Handle.ToString("X8")); - - rtbInfo.SetFontBold(); - rtbInfo.AppendText("Title: "); - rtbInfo.SetFontRegular(); - rtbInfo.AppendLine(SelectedWindow.Text); + AddInfo("Window handle", SelectedWindow.Handle.ToString("X8")); + AddInfo("Window title", SelectedWindow.Text); + AddInfo("Class name", SelectedWindow.ClassName); + AddInfo("Process name", SelectedWindow.ProcessName); + AddInfo("Window rectangle", SelectedWindow.Rectangle.ToString()); + AddInfo("Client rectangle", SelectedWindow.ClientRectangle.ToString()); + AddInfo("Window styles", SelectedWindow.Styles.ToString()); } } + + private void AddInfo(string name, string value) + { + rtbInfo.SetFontBold(); + rtbInfo.AppendLine(name + ":"); + rtbInfo.SetFontRegular(); + rtbInfo.AppendLine(value); + rtbInfo.AppendLine(); + } } } \ No newline at end of file