C# Control Events in Visual Studio

steved

Regular
Joined
Mar 28, 2003
Messages
82
Location
Regina, SK
I've just come to the realization that I've 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. I'd 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, I'm an idiot. :)

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

Too bad I'm 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 haven't really done much with the IDE that doesn't have a direct equivalent in VB.net that I've already used.
 
It's only because I had already read your previous 8 posts and found that since you are advanced in .NET, you would've 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, I'll stop typing now. :)
 
Back
Top