invoke hotkey to show icon

This commit is contained in:
Kang Yu 2024-04-01 11:11:30 -07:00
parent 309cd5444c
commit dd429c1df7
2 changed files with 4 additions and 2 deletions

View file

@ -43,6 +43,8 @@ namespace PersistentWindows.SystrayShell
User32.KeyModifier modifier = (User32.KeyModifier)((int)m.LParam & 0xFFFF); // The modifier of the hotkey that was pressed. User32.KeyModifier modifier = (User32.KeyModifier)((int)m.LParam & 0xFFFF); // The modifier of the hotkey that was pressed.
int id = m.WParam.ToInt32(); // The id of the hotkey that was pressed. int id = m.WParam.ToInt32(); // The id of the hotkey that was pressed.
Program.ShowRestoreTip();
Program.HideRestoreTip(); //show icon
hkwin.HotKeyPressed(); hkwin.HotKeyPressed();
return; return;
} }

View file

@ -388,7 +388,7 @@ namespace PersistentWindows.SystrayShell
return false; return false;
} }
static void ShowRestoreTip() public static void ShowRestoreTip()
{ {
if (systrayForm.contextMenuStripSysTray.InvokeRequired) if (systrayForm.contextMenuStripSysTray.InvokeRequired)
systrayForm.contextMenuStripSysTray.BeginInvoke((Action)delegate () systrayForm.contextMenuStripSysTray.BeginInvoke((Action)delegate ()
@ -414,7 +414,7 @@ namespace PersistentWindows.SystrayShell
} }
} }
static void HideRestoreTip() public static void HideRestoreTip()
{ {
if (systrayForm.contextMenuStripSysTray.InvokeRequired) if (systrayForm.contextMenuStripSysTray.InvokeRequired)
systrayForm.contextMenuStripSysTray.BeginInvoke((Action)delegate () systrayForm.contextMenuStripSysTray.BeginInvoke((Action)delegate ()