can't get pressing CTRL+Z

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Girevik
    New Member
    • Jan 2010
    • 4

    can't get pressing CTRL+Z

    can't get pressing CTRL+Z
    how I can do it?

    (C#)
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    This doesn't really describe what you are trying to do.
    Are you trying to *get* or receive every time the user presses control+z?
    Or are you trying programmaticall y simulate the pressing of control+z?
    If you could better describe what your goal is, not just how you hope to accomplish it through control+z that would help a lot.

    Comment

    • Girevik
      New Member
      • Jan 2010
      • 4

      #3
      I wrote such method:
      Code:
      protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
              {
                  if (keyData == (Keys.Control | Keys.Z))
                  {
                      // anything                   
                      return true;
                  }
                  return base.ProcessCmdKey(ref msg, keyData);
      
              }
      Last edited by Frinavale; Jun 25 '10, 03:06 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        That code works just fine for trapping control+z for me.
        How are you using it, it will only effect the form you override and all the controls on it. (With the possible exception of certain COM controls maybe)

        Comment

        Working...