Catch a user pressing Alt-K




From a previous post you guys may be aware I'm writing a component
which is a text box and icon inside a panel. I want to detect when a
user presses Alt+K together so I can throw up a dialog.

It's basically identical to how the Alt-K feature works in the To and
CC fields of Microsoft Outlook. I was going to use this code to detect
the event:

Private Sub completerCatcher(ByVal sender As Object, ByVal e As
KeyPressEventArgs)
If (Char.ToLower(e.KeyChar) = "k" And
My.Computer.Keyboard.AltKeyDown) Then
activatePicker(Nothing, Nothing)
End If
End Sub

Now I'd imagine this would work, only it doesn't fire when the user
presses Alt+K. I imagine it's handled by the parent form. Since my
component is used on multiple dialogs (and sometimes many times per
single dialog) I need to know how I can catch these events.

Does anybody know?

.



Relevant Pages

  • Re: Catch a user pressing Alt-K
    ... user presses Alt+K together so I can throw up a dialog. ... Private Sub completerCatcher(ByVal sender As Object, ... KeyPressEventArgs) ... I imagine it's handled by the parent form. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Code to prohibit runtime error 2105
    ... It might help to know what code is in the event procedure, but I'm guessing ... Private Sub cmdAdd_Click ... > except when the user presses "Add new name", begins typing in a name and ... The Run Time Error #2105 appears. ...
    (microsoft.public.access.formscoding)
  • Re: Creating different actions for every time you press a key
    ... label changes caption every time the user presses the Space key .. ... Private Sub Form_KeyPress ... i do that and after i press Spacebar .. ... i try this and it doesnt work:(It works if I press it once but ...
    (comp.lang.basic.visual.misc)
  • Re: change cell on exit vba
    ... Success will also be thwarted if in the shorter version the user presses 'NO' ... Unless it is a single sheet workbook, the results might be more satisfying ... Private Sub Workbook_BeforeClose ...
    (microsoft.public.excel.programming)
  • Adding a record
    ... At the moment I'm building a Windows Form which has bound controls. ... Using some examples I created navigation buttons, ... Private Sub ButtonAdd_Click(ByVal sender As System.Object, ... The user presses the Add button, the user sees a form with blank fields, the user fills them and presses a save-button to save it to the database. ...
    (microsoft.public.dotnet.framework.windowsforms)