Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating new event handlers ???? 2

Status
Not open for further replies.

keithinuk

Technical User
May 14, 2002
56
GB
Hello
In VB3 (yes I'm that old) if you wanted to create a new event on a form, for example, all you had to do was click a combo at the top of the code window and choose your event. You were presented with the relevant 'Private Sub .....' etc and it gave you the correct signature.
In .net if I double click the form I get the Load event by default. I can select the necessary event from the dropdown when I change '.Load' following 'Handles myForm' but it doesn't automatically update the signature. I then get an error, no surprise, telling me that it can't handle this event because it doesn't have the same signature.
This seems like a backwards step to me so I guess I'm missing something obvious.

Any tips or advice please ?????

Thanks in advance
Keith In case I forget to say "Thank you" I'll say it now - thank you for your help !!!
 
In the Properties list when you have a control selected (in design mode), there's a little lightning bolt toolbar button. If you press that you're presented a list of events for the selected control. You can use the dropdown for a particular event to select an existing routine to associate with it, or double click it to get a new standard Button1_Click() type function created and displayed for you.

Double clicking on an already filled-in event will bring you to the current code.
 
Excellent news.

Thank you very much - both of you !!!!!!!!!!! In case I forget to say "Thank you" I'll say it now - thank you for your help !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top