CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    93

    [RESOLVED] Event Code not generating

    I have VS2008. If I am using vb.net, in the code window, I can select a control and any of the related events and the basic code structure is automatically formed.But when I use C#, it does not happen. I am not able to automatically link basic events like Form_Resize, etc. What do I have to do? or is it that this feature is not available in C# at all?
    Thanks
    GeoNav

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Event Code not generating

    It is most certainly available in C#. If you double click a control, the default event should be wired up for you. If you look at the properties window with a control selected, click the little lightning bolt to get a list of events.

  3. #3
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Event Code not generating

    It is common control (like one from System.Windows.Forms.dll), or a custom control? The event skelet is generated on double click only if one of control's event is annotated with DefaultEventAttribute.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  4. #4
    Join Date
    Aug 2006
    Posts
    93

    Re: Event Code not generating

    Quote Originally Posted by BigEd781 View Post
    It is most certainly available in C#. If you double click a control, the default event should be wired up for you. If you look at the properties window with a control selected, click the little lightning bolt to get a list of events.
    Thanks a lot. It worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured