When you make a textbox in VB 6 the textbox have different events like KeyPress. I cant find anything like that in C#. So how do I do to get my program to respond to KeyPress event?
In the properties window, click the little Lightning bolt icon. The
properties list will change to an events list. Type the desired name
of your event sub beside the event you want, and press enter.
It will now add the event handler to your control.
While focused on the control in design view, goto the properties window and click on the Lightning-Bolt (Events) then double-click on the event you wish to use.
I wasnt aware of the events button on the properties window. Up until now, Ive always used the code window and its object/procedure drop-down menus to get into the various event handlers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.