C# Control Events in Visual Studio

SteveD

0
Joined
Mar 28, 2003
Messages
84
Ive just come to the realization that Ive been hand-coding all my event handlers in C#. I went to try adding an event handler in the VB style of clickin the dropdown combo box above the code window and to my surprise all that was available to me was [ProjectName].[FormName]. Whups!

Any idea how I can find a GUI interface for adding event handlers? I realize this is a really ridiculous question, but until I realized that I was coding them by hand, I never really thought about it. Id almost rather use a GUI tool as to avoid mucking around in the Windows Form Designer code.

(Edit: I know this must be possible, since double-clicking a control in the designer window automatically creates an event handler for that controls default event - like Button_Click() for a command button.)

Thanks!

.steve
 
Click a control, and then click the lightning bolt icon in the property grid.
Viola! A list of events. Double click on one, or type in the desired sub
name and press enter.
 
Zoiks! Well, Im an idiot. :)

But I introduced the topic with that point, so I think its excused. Thanks, vf. I knew it had to be in there somewhere, but for some reason I couldnt find it documented for the life of me. :P

Too bad Im a contractor where I work. A vs.net course would really make me happy. :)

Thanks again.

.steve
 
Steve, is that what you ment? If so, boy was I on the wrong track. :(


[edit] I guess it was, (we posted at the same time)
 
Yeah, sorry. I should have clarified that it was like a "day-one" learning question. Been using C# for a while, but I havent really done much with the IDE that doesnt have a direct equivalent in VB.net that Ive already used.
 
Its only because I had already read your previous 8 posts and found that since you are advanced in .NET, you wouldve already been aware of what Volte pointed out. So I was thinking it was something else that you were after. To make a long story short, Ill stop typing now. :)
 
Back
Top