Microsoft Visual Studio and C#: How to Visually Add Events to Controls?

后端 未结 2 1871
北恋
北恋 2020-11-29 12:14

How would one go about adding an event handler to a control in a form in Microsoft Visual Studio (2008) with C#?

I can do it manually, but opening the Designer.cs fil

2条回答
  •  佛祖请我去吃肉
    2020-11-29 12:58

    All you have to do is to have the form/control open in designer view, have the control in question in focus/selected, open up the properties view and flick over to the events tab. Double click on the event that you're interested in handling.

    alt text http://img222.imageshack.us/img222/4456/propv.jpg

提交回复
热议问题