KeyboardHookedイベントのデータを提供する。
Inheritance: CancelEventArgs
Exemple #1
0
 private int CallNextHook(int code, KeyboardMessage message, ref KeyboardState state)
 {
     if (code >= 0)
     {
         KeyboardHookedEventArgs e = new KeyboardHookedEventArgs(message, ref state);
         OnKeyboardHooked(e);
         if (e.Cancel)
         {
             return(-1);
         }
     }
     return(CallNextHookEx(IntPtr.Zero, code, message, ref state));
 }
Exemple #2
0
 //横流しするだけ
 private void OnKeyboardUpDown(object sender, KeyboardHookedEventArgs e)
 {
     try
     {
         this.KeyboardUpDown?.Invoke(this, e);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error when executing KeyboardUpDown event:" + ex.Message);
     }
 }
Exemple #3
0
		private int CallNextHook(int code, KeyboardMessage message, ref KeyboardState state) 
        {
			if (code >= 0) 
            {
				KeyboardHookedEventArgs e = new KeyboardHookedEventArgs(message, ref state);
				OnKeyboardHooked(e);
				if (e.Cancel) 
                {
					return -1;
				}
			}
			return CallNextHookEx(IntPtr.Zero, code, message, ref state);
		}
Exemple #4
0
		///<summary>
		///KeyboardHookedイベントを発生させる。
		///</summary>
		///<param name="e">イベントのデータ。</param>
		protected virtual void OnKeyboardHooked(KeyboardHookedEventArgs e)
        {
			KeyboardHookedEventHandler handler = base.Events[EventKeyboardHooked] as KeyboardHookedEventHandler;
            handler?.Invoke(this, e);
		}
Exemple #5
0
        ///<summary>
        ///KeyboardHookedイベントを発生させる。
        ///</summary>
        ///<param name="e">イベントのデータ。</param>
        protected virtual void OnKeyboardHooked(KeyboardHookedEventArgs e)
        {
            KeyboardHookedEventHandler handler = base.Events[EventKeyboardHooked] as KeyboardHookedEventHandler;

            handler?.Invoke(this, e);
        }