Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

digiwombat

@digiwombat
About
Posts
8
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Kill key strokes while hooked
    D digiwombat

    Thanks! I'll go mess around with my hooking code.

    .NET (Core and Framework)

  • Kill key strokes while hooked
    D digiwombat

    Ok, I am just going to use blockinput() I think. It blocks the mouse too, but oh well.

    .NET (Core and Framework)

  • Kill key strokes while hooked
    D digiwombat

    Also, I am using WH_KEYBOARD_LL to hook, if that helps out more.

    .NET (Core and Framework)

  • Kill key strokes while hooked
    D digiwombat

    It is a global keyboard hook. I am using the Kennedy.ManagedHooks DLL from this site. I enable it with a hotkey, and disable it the same way. public Form1() { // Alt = 1, Ctrl = 2, Shift = 4, Win = 8 Form1.RegisterHotKey(this.Handle,this.GetType().GetHashCode(), 8, (int)'P'); InitializeComponent(); keyboardHook = new Kennedy.ManagedHooks.KeyboardTracking(); keyboardHook.KeyboardEvent += new Kennedy.ManagedHooks.KeyboardTracking.KeyboardEventHandler(keyboardHook_KeyboardEventExt); } protected override void WndProc(ref Message m) { if (m.Msg == 0x0312) if (keyboardHook.IsHooked) { keyboardHook.UninstallHook(); input = false; textBox4.Text = ""; } else { textBox4.Text = ""; keyboardHook.InstallHook(); input = true; } base.WndProc(ref m); } private void keyboardHook_KeyboardEventExt(Kennedy.ManagedHooks.KeyboardEvents kEvent, Keys key) { bool shi; if(keyboardHook.ShiftPressed == true) shi = true; else shi = false; if(kEvent == KeyboardEvents.KeyDown){ string msg; //snipped out some key parsing junk. if(shi == true) msg = key.ToString(); else msg = key.ToString().ToLower(); textBox4.Text += msg; } } I think that covers all the relevant code from my end of the application. If there are any questions about what anything does more specifically, I can answer those. The Hotkey works fine, and I am planning to add the message filter or whatever when it hotkeys in and remove it when they hotkey out of the hook, obviously. Thanks for the help thus far.

    .NET (Core and Framework)

  • openFileDialog help needed
    D digiwombat

    You want to dispose of the parent form, or just hide the form that the open file dialog will lead to? Because if you just hid the receiving dialog, you could just hide the dialog onload and show the openFileDialog. That'd work, right?

    .NET (Core and Framework) question csharp help

  • Kill key strokes while hooked
    D digiwombat

    Just *can't* figure out. Why is it that we always leave out the mosti mportant words? haha.

    .NET (Core and Framework)

  • Stupid CheckBox Behavior, please help!!
    D digiwombat

    George's replies line up with what I've found, but if it's still messing up for you, you could always set a variable with the click function and with the code, and check that variable on check changed before you run anything else. if(clicked == false) //click toggled else //code toggled

    .NET (Core and Framework) help tutorial question

  • Kill key strokes while hooked
    D digiwombat

    Ok, I am using a global hook, and I am wondering how I can keep the keys from sending to the active program. I searched around the net and CodeProject and I just can't figure it out. I'm not terribly familiar with WindowsAPI stuff. Thanks in advance. -- modified at 19:33 Friday 17th February, 2006

    .NET (Core and Framework)
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups