mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
set icon for hotkey dialog
This commit is contained in:
parent
84a8ac5792
commit
d3318e1443
5 changed files with 26 additions and 10 deletions
|
@ -148,7 +148,7 @@ namespace PersistentWindows.Common
|
|||
this.Controls.Add(this.buttonCloseTab);
|
||||
this.Controls.Add(this.buttonNextTab);
|
||||
this.Controls.Add(this.buttonPrevTab);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
|
|
|
@ -30,6 +30,8 @@ namespace PersistentWindows.Common
|
|||
Move += new EventHandler(FormMove);
|
||||
FormClosing += new FormClosingEventHandler(FormClose);
|
||||
|
||||
Icon = PersistentWindowProcessor.icon;
|
||||
|
||||
aliveTimer = new System.Timers.Timer(2000);
|
||||
aliveTimer.Elapsed += AliveTimerCallBack;
|
||||
aliveTimer.SynchronizingObject = this;
|
||||
|
|
|
@ -170,7 +170,7 @@ namespace PersistentWindows.Common
|
|||
private readonly List<IntPtr> winEventHooks = new List<IntPtr>();
|
||||
private User32.WinEventDelegate winEventsCaptureDelegate;
|
||||
|
||||
public System.Drawing.Icon icon = null;
|
||||
public static System.Drawing.Icon icon = null;
|
||||
|
||||
private int leftButtonClicks = 0;
|
||||
|
||||
|
|
|
@ -10,11 +10,10 @@ namespace PersistentWindows.SystrayShell
|
|||
public class HotKeyForm : Form
|
||||
{
|
||||
static HotKeyWindow hkwin = null;
|
||||
static Thread messageLoop = null;
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
messageLoop = new Thread(() =>
|
||||
Thread messageLoop = new Thread(() =>
|
||||
{
|
||||
hkwin = new HotKeyWindow();
|
||||
Application.Run(new HotKeyForm());
|
||||
|
@ -26,10 +25,10 @@ namespace PersistentWindows.SystrayShell
|
|||
|
||||
messageLoop.Start();
|
||||
}
|
||||
|
||||
public HotKeyForm()
|
||||
{
|
||||
//InitializeComponent();
|
||||
|
||||
var r = User32.RegisterHotKey(this.Handle, 0, (int)User32.KeyModifier.Alt, 0x51); // Register Alt + Q
|
||||
}
|
||||
|
||||
|
@ -58,12 +57,27 @@ namespace PersistentWindows.SystrayShell
|
|||
base.SetVisibleCore(false);
|
||||
}
|
||||
|
||||
~HotKeyForm()
|
||||
/*
|
||||
#region IDisposable
|
||||
public virtual void Dispose(bool disposing)
|
||||
{
|
||||
messageLoop.Abort();
|
||||
//messageLoop.Abort();
|
||||
User32.UnregisterHotKey(this.Handle, 0);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
~HotKeyForm()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
#endregion
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ namespace PersistentWindows.SystrayShell
|
|||
else
|
||||
systrayForm.upgradeNoticeMenuItem.Text = "Enable upgrade notice";
|
||||
|
||||
pwp.icon = IdleIcon;
|
||||
PersistentWindowProcessor.icon = IdleIcon;
|
||||
if (fix_zorder_specified)
|
||||
{
|
||||
if (fix_zorder)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue