Beispiel #1
0
 /// <summary>
 /// Sends a System command
 /// </summary>
 /// <param name="command">command to be sent.</param>
 private void SendSysCommand(User32.SystemMenuCommand command)
 {
     if (this.SystemEvent != null)
     {
         WindowMenuEventArgs ev = new WindowMenuEventArgs((int)command);
         this.SystemEvent(this, ev);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Processes a system event on the system menu.
 /// </summary>
 /// <param name="sender">Sender object</param>
 /// <param name="e">Window menu event args</param>
 protected void SystemMenuSystemEvent(object sender, WindowMenuEventArgs e)
 {
     this.SendNCWinMessage(User32.WindowMessage.SysCommand, (IntPtr)e.SystemCommand, IntPtr.Zero);
 }