none
KeyDown for Form and all its Controls RRS feed

  • Question

  • Hi,

    Is it possible to have one KeyDown for the form and all its Controls so wherever F5 is press then I can run a specific code without having to include the KeyDown in every control on the form?

    How can I do this please?


    Thanks,
    Jassim
    Wednesday, October 21, 2015 10:28 PM

Answers

All replies

  • Take a look at this property.
    Thursday, October 22, 2015 1:42 AM
    Answerer
  • Hi Jassim,

    As @cheong00said, you could set KeyPreview property to true on properties window of Form. Then register KeyDown event of Form.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 22, 2015 3:20 AM
    Moderator