mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 05:25:37 +02:00
invoke hotkey to show icon
This commit is contained in:
parent
309cd5444c
commit
dd429c1df7
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue