Exemplo n.º 1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     pc.UpdateFlying();
     if (pc.isFlying > 0 && registered == false)
     {
         Keys r = Keys.R;
         WindowsShell.RegisterHotKey(this, r);
         Keys f = Keys.F;
         WindowsShell.RegisterHotKey(this, f);
         registered = true;
     }
     else if (registered == true)
     {
         WindowsShell.UnregisterHotKey(this);
         WindowsShell.UnregisterHotKey(this);
         registered = false;
     }
 }
Exemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     timer1.Enabled = false;
     WindowsShell.UnregisterHotKey(this);
     WindowsShell.UnregisterHotKey(this);
 }