locked
how to create an event for keypress RRS feed

  • Question

  • i want to develop a program that has an event(user defined) in it which gets fired automatically when a key is pressed in WPF and want to retrieve that

    values of key;

    the form should not contain any other object(like botton,textbutton etc);

    thanks

    • Changed type litdev Friday, March 8, 2013 1:25 PM this is a question
    Friday, March 8, 2013 10:14 AM

Answers

  • GraphicsWindow.KeyDown = OnKeyDown

    Sub OnKeyDown

      If GraphicsWIndow.LastKey = "Your Key Here" Then

    (Your code here)

      EndIf

    EndSub

    • Proposed as answer by litdev Friday, March 8, 2013 1:25 PM
    • Marked as answer by Nonki Takahashi Friday, March 15, 2013 4:41 AM
    Friday, March 8, 2013 1:08 PM