From ffb2016e483ecf1a58b8d91cfbe23a979ea348f1 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 8 Aug 2020 12:28:09 +0300 Subject: [PATCH] Fixed bug when editor was invisible after window maximized --- Crypto Notepad/Forms/MainForm.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Crypto Notepad/Forms/MainForm.cs b/Crypto Notepad/Forms/MainForm.cs index f869338..d8dfdad 100644 --- a/Crypto Notepad/Forms/MainForm.cs +++ b/Crypto Notepad/Forms/MainForm.cs @@ -34,6 +34,7 @@ protected override void WndProc(ref Message m) { const int WM_SYSCOMMAND = 0x112; const int SC_MINIMIZE = 0xF020; + const int SC_MAXIMIZE = 0xF030; const int SC_RESTORE = 0xF120; try { @@ -41,7 +42,7 @@ protected override void WndProc(ref Message m) { richTextBox.Visible = false; } - if (m.Msg == WM_SYSCOMMAND & m.WParam.ToInt32() == SC_RESTORE & !fileLockedPanel.Visible) + if (m.Msg == WM_SYSCOMMAND & m.WParam.ToInt32() == SC_RESTORE | m.WParam.ToInt32() == SC_MAXIMIZE & !fileLockedPanel.Visible) { richTextBox.Visible = true; }