|
|
|
@ -7,6 +7,7 @@ using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Windows.Forms; |
|
|
|
using WinFormControl.Converter; |
|
|
|
|
|
|
|
namespace WinFormControl |
|
|
|
{ |
|
|
|
@ -32,9 +33,13 @@ namespace WinFormControl |
|
|
|
protected override void OnLoad(EventArgs e) |
|
|
|
{ |
|
|
|
base.OnLoad(e); |
|
|
|
if (!ParentForm.KeyPreview) |
|
|
|
ParentForm.KeyPreview = true; |
|
|
|
ParentForm.KeyPress += ParentForm_KeyPress; |
|
|
|
var parentForm = ControlUtil.GetParentFormm(this); |
|
|
|
if (parentForm != null) |
|
|
|
{ |
|
|
|
if (!parentForm.KeyPreview) |
|
|
|
parentForm.KeyPreview = true; |
|
|
|
parentForm.KeyPress += ParentForm_KeyPress; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
bool reading = false; |
|
|
|
|