Click here to Skip to main content
15,900,258 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Stupid CheckBox Behavior, please help!! Pin
George L. Jackson17-Feb-06 14:53
George L. Jackson17-Feb-06 14:53 
AnswerRe: Stupid CheckBox Behavior, please help!! Pin
peryMimon17-Nov-09 22:43
peryMimon17-Nov-09 22:43 
QuestionKill key strokes while hooked Pin
digiwombat16-Feb-06 18:31
digiwombat16-Feb-06 18:31 
QuestionRe: Kill key strokes while hooked Pin
George L. Jackson17-Feb-06 13:22
George L. Jackson17-Feb-06 13:22 
AnswerRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 13:33
digiwombat17-Feb-06 13:33 
GeneralRe: Kill key strokes while hooked Pin
George L. Jackson17-Feb-06 13:33
George L. Jackson17-Feb-06 13:33 
QuestionRe: Kill key strokes while hooked Pin
[Marc]17-Feb-06 13:46
[Marc]17-Feb-06 13:46 
AnswerRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 14:08
digiwombat17-Feb-06 14:08 
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()<br />
        {<br />
            // Alt = 1, Ctrl = 2, Shift = 4, Win = 8<br />
            Form1.RegisterHotKey(this.Handle,this.GetType().GetHashCode(), 8, (int)'P');<br />
            InitializeComponent();<br />
            keyboardHook = new Kennedy.ManagedHooks.KeyboardTracking();<br />
            keyboardHook.KeyboardEvent += new Kennedy.ManagedHooks.KeyboardTracking.KeyboardEventHandler(keyboardHook_KeyboardEventExt);<br />
            <br />
        }<br />
protected override void WndProc(ref Message m)<br />
        {<br />
            if (m.Msg == 0x0312)<br />
                if (keyboardHook.IsHooked)<br />
                {<br />
                    keyboardHook.UninstallHook();<br />
                    input = false;<br />
                    textBox4.Text = "";<br />
                }<br />
                else<br />
                {<br />
                    textBox4.Text = "";<br />
                    keyboardHook.InstallHook();<br />
                    input = true;<br />
                }<br />
             base.WndProc(ref m);<br />
        }<br />
 private void keyboardHook_KeyboardEventExt(Kennedy.ManagedHooks.KeyboardEvents kEvent, Keys key)<br />
        {<br />
            bool shi;<br />
            if(keyboardHook.ShiftPressed == true)<br />
                shi = true;<br />
            else<br />
                shi = false;<br />
            if(kEvent == KeyboardEvents.KeyDown){<br />
                string msg;<br />
                //snipped out some key parsing junk.<br />
                if(shi == true)<br />
                    msg = key.ToString();<br />
                else<br />
                    msg = key.ToString().ToLower();<br />
                textBox4.Text += msg;<br />
            }<br />
}<br />


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.
GeneralRe: Kill key strokes while hooked Pin
Dave Kreskowiak17-Feb-06 14:59
mveDave Kreskowiak17-Feb-06 14:59 
GeneralRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 17:16
digiwombat17-Feb-06 17:16 
GeneralRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 18:06
digiwombat17-Feb-06 18:06 
GeneralRe: Kill key strokes while hooked Pin
Dave Kreskowiak18-Feb-06 3:33
mveDave Kreskowiak18-Feb-06 3:33 
GeneralRe: Kill key strokes while hooked Pin
digiwombat18-Feb-06 10:40
digiwombat18-Feb-06 10:40 
Questionflash with .net Pin
Vineet Rajan16-Feb-06 6:15
Vineet Rajan16-Feb-06 6:15 
QuestionLetting the Parent handle the click Pin
Eric Schaefer16-Feb-06 2:35
Eric Schaefer16-Feb-06 2:35 
QuestionWindows Forms and 3rd Party API's Pin
robasmith15-Feb-06 9:27
robasmith15-Feb-06 9:27 
AnswerRe: Windows Forms and 3rd Party API's Pin
Dave Kreskowiak15-Feb-06 14:32
mveDave Kreskowiak15-Feb-06 14:32 
QuestionConverting from WinHelp to HTML Help Pin
ellenu15-Feb-06 6:40
ellenu15-Feb-06 6:40 
QuestionFlex Cell 2.0 .net Framework Pin
welbert14-Feb-06 15:03
welbert14-Feb-06 15:03 
AnswerRe: Flex Cell 2.0 .net Framework Pin
Judah Gabriel Himango15-Feb-06 8:12
sponsorJudah Gabriel Himango15-Feb-06 8:12 
QuestionThe request failed with HTTP status 401: Unauthorized Pin
Paul_Taylor14-Feb-06 14:12
Paul_Taylor14-Feb-06 14:12 
AnswerRe: The request failed with HTTP status 401: Unauthorized Pin
Paul_Taylor14-Feb-06 18:30
Paul_Taylor14-Feb-06 18:30 
Questionconsole.writeline windows application equivalent Pin
LuluSailor14-Feb-06 8:06
LuluSailor14-Feb-06 8:06 
AnswerRe: console.writeline windows application equivalent Pin
Dave Kreskowiak14-Feb-06 10:08
mveDave Kreskowiak14-Feb-06 10:08 
QuestionModifing Interop dlls to use SecureString Pin
dave_kinmond14-Feb-06 4:46
dave_kinmond14-Feb-06 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.