Modifier Key without KeyEventArgs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martijn Mulder

    Modifier Key without KeyEventArgs

    How can I check the state of the modifier keys (Alt, Control, Shift) when
    there is no System.Windows. Forms.KeyEventA rgs-object available (i.e. when
    not responding to a key-event)?


  • Ciaran O''Donnell

    #2
    RE: Modifier Key without KeyEventArgs

    Use Form.ModifierKe ys

    Ciaran O'Donnell

    "Martijn Mulder" wrote:
    How can I check the state of the modifier keys (Alt, Control, Shift) when
    there is no System.Windows. Forms.KeyEventA rgs-object available (i.e. when
    not responding to a key-event)?
    >
    >
    >

    Comment

    • Morten Wennevik

      #3
      Re: Modifier Key without KeyEventArgs

      Just to clarify, Form.ModifierKe ys is actually Control.Modifie rKeys.

      It is not reliable inside a KeyUp/Down (and perhaps Press) event, but
      outside if should be fine.


      On Thu, 09 Nov 2006 13:26:01 +0100, Ciaran O''Donnell
      <CiaranODonnell @discussions.mi crosoft.comwrot e:
      Use Form.ModifierKe ys
      >
      Ciaran O'Donnell
      >
      "Martijn Mulder" wrote:
      >
      >How can I check the state of the modifier keys (Alt, Control, Shift)
      >when
      >there is no System.Windows. Forms.KeyEventA rgs-object available (i.e.
      >when
      >not responding to a key-event)?
      >>
      >>
      >>


      --
      Happy Coding!
      Morten Wennevik [C# MVP]

      Comment

      Working...