Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
A problem with Trackbar OnKeyDown on a Form
I have a form and a Trackbar on it. Both of them has an OnKeyDown event. As you may know better, at the run-time, if we press a key, only the OnKeyDown of Trackbar occures. But how we can able to choose each of them to be active? For example if i=1 then we want to active the OnKeyDown of the Form and if i=0 we wan to active the relevant event of the trackbar. Please note that it is not possible to disable the trackbar. Now, Could you please help me by an example? Thanks