mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
fixed #1777: Force activate print dialog
This commit is contained in:
parent
5b077d4871
commit
4955204661
2 changed files with 7 additions and 4 deletions
1
ShareX.HelpersLib/Printer/PrintForm.Designer.cs
generated
1
ShareX.HelpersLib/Printer/PrintForm.Designer.cs
generated
|
@ -115,6 +115,7 @@ private void InitializeComponent()
|
|||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "PrintForm";
|
||||
this.Shown += new System.EventHandler(this.PrintForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudMargin)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
|
|
@ -23,6 +23,7 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using ShareX.HelpersLib;
|
||||
using ShareX.HelpersLib.Properties;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
@ -45,10 +46,6 @@ public PrintForm(Image img, PrintSettings settings, bool previewOnly = false)
|
|||
LoadSettings();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
|
@ -67,6 +64,11 @@ protected override void Dispose(bool disposing)
|
|||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void PrintForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
this.ForceActivate();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
nudMargin.SetValue(printSettings.Margin);
|
||||
|
|
Loading…
Reference in a new issue