When auto lock on minimize, editor text was visible in windows taskbar

This commit is contained in:
Alexander 2019-10-15 20:13:07 +03:00
parent bea1925438
commit 6606caf589

View file

@ -31,6 +31,17 @@ public MainForm()
richTextBox.AllowDrop = true;
}
protected override void WndProc(ref Message m)
{
const int WM_SYSCOMMAND = 0x112;
const int SC_MINIMIZE = 0xF020;
if (m.Msg == WM_SYSCOMMAND & m.WParam.ToInt32() == SC_MINIMIZE & settings.autoLock & !string.IsNullOrEmpty(PublicVar.encryptionKey.Get()))
{
richTextBox.Visible = false;
}
base.WndProc(ref m);
}
#region Methods
private void DecryptAES()
{