Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • *Experts*
Posted

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.

  • Moderators
Posted

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]

Visit...Bassic Software
Posted

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

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...