Morpheus Posted January 20, 2003 Posted January 20, 2003 I have used VB 6 before but now I'm moving to C#. When you make a textbox in VB 6 the textbox have different events like KeyPress. I can't find anything like that in C#. So how do I do to get my program to respond to KeyPress event? Quote
*Experts* Volte Posted January 20, 2003 *Experts* Posted January 20, 2003 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. Quote
Moderators Robby Posted January 20, 2003 Moderators Posted January 20, 2003 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. [edit]beaten to the punch. :( [/edit] Quote Visit...Bassic Software
VisualDeveloper Posted January 22, 2003 Posted January 22, 2003 Cool! I wasn't aware of the events button on the properties window. Up until now, I've always used the code window and it's object/procedure drop-down menus to get into the various event handlers. Thanks, Shuaib Quote Windows XP Professional, Visual Studio .NET Enterprise Architect, Dell Dimension 8100, 15" TFT Monitor, Intel Pentium 4 CPU 1700MHz, 40GB Hard Disk, nVidia GeForce 3, NEC CD-RW 16x, Samsung DVD 16x.
*Experts* Volte Posted January 22, 2003 *Experts* Posted January 22, 2003 Those aren't available in C#. That's why you do it this way. Likewise, the event button is not available in VB.NET. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.