Exemplo n.º 1
0
 private bool mHook_MouseDownEvent(llc.MouseHook sender, uint vkCode, int x, int y, int delta, bool injected)
 {
     if (vkCode == (uint)System.Windows.Forms.Keys.MButton)
     {
         MouseState mState = Mouse.GetState();
         Color      color  = GetColorAt(mState.X, mState.Y);
         Clipboard.SetText("#" + color.R.ToString("X2") + color.G.ToString("X2") + color.B.ToString("X2"));
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
 public Game1() : base()
 {
     mHook = new llc.MouseHook();
     mHook.MouseDownEvent += mHook_MouseDownEvent;
     mHook.InstallGlobalHook();
 }