static internal void InitSysMenu(System.Windows.Forms.IWin32Window wnd) { IntPtr sysMenuHandle = About.GetSystemMenu(wnd.Handle, false); About.AppendMenu(sysMenuHandle, About.MF_SEPARATOR, new IntPtr(0), string.Empty); Assembly crt = Assembly.GetExecutingAssembly(); object[] attr = crt.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), true); AssemblyDescriptionAttribute desc = attr[0] as AssemblyDescriptionAttribute; About.AppendMenu(sysMenuHandle, About.MF_STRING, new IntPtr(About.IDM_ABOUT), "About " + desc.Description); if (_wndHook == null) _wndHook = new MsgHookWindow(wnd); }
static internal void InitSysMenu(System.Windows.Forms.IWin32Window wnd) { IntPtr sysMenuHandle = About.GetSystemMenu(wnd.Handle, false); About.AppendMenu(sysMenuHandle, About.MF_SEPARATOR, new IntPtr(0), string.Empty); Assembly crt = Assembly.GetExecutingAssembly(); object[] attr = crt.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), true); AssemblyDescriptionAttribute desc = attr[0] as AssemblyDescriptionAttribute; About.AppendMenu(sysMenuHandle, About.MF_STRING, new IntPtr(About.IDM_ABOUT), "About " + desc.Description); if (_wndHook == null) { _wndHook = new MsgHookWindow(wnd); } }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } } if (!disposing) { if (_wndHook != null) { _wndHook.Dispose(); } _wndHook = null; } base.Dispose(disposing); }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } } if (!disposing) { if (_wndHook != null) _wndHook.Dispose(); _wndHook = null; } base.Dispose(disposing); }