Fixed focus problems with the EditorForm: Problems when clicking on a ToolStrip/MenuStrip when the form didn't have focus by adding two new controls for this. Also fixed the PrintDialog issue by using a BeginInvoke.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1623 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-02-02 12:02:07 +00:00
commit 0e522f6afc
5 changed files with 152 additions and 17 deletions

View file

@ -24,7 +24,6 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Printing;
using System.IO;
using System.Windows.Forms;
@ -38,6 +37,7 @@ using Greenshot.Helpers;
using Greenshot.Plugin;
using GreenshotPlugin.Core;
using IniFile;
using System.Threading;
namespace Greenshot {
/// <summary>
@ -476,9 +476,12 @@ namespace Greenshot {
}
void BtnPrintClick(object sender, EventArgs e) {
DestinationHelper.ExportCapture(Destinations.PrinterDestination.DESIGNATION, surface, surface.CaptureDetails);
// The BeginInvoke is a solution for the printdialog not having focus
this.BeginInvoke((MethodInvoker) delegate {
DestinationHelper.ExportCapture(Destinations.PrinterDestination.DESIGNATION, surface, surface.CaptureDetails);
});
}
void CloseToolStripMenuItemClick(object sender, System.EventArgs e) {
this.Close();
}