Results 1 to 4 of 4

Thread: Add event handler to contextmenustrip item

Threaded View

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Add event handler to contextmenustrip item

    I am trying to add a menuitem and an event handler to a contextmenustrip :
    I can add an item easy enough with :
    Code:
    this.contextMenuStrip1.Items.Add("test choice");
    But if i try to add the item and a handler with :
    Code:
    this.contextMenuStrip1.Items.Add("test choice", new EventHandler(NewLoad));
    it throws a wobbler :-(

    I realise that it has something to do with delegates and so on but I'm pretty new to custom event handling.

    Can anyone point me in the right direction ???
    Thanks in Advance
    Last edited by venerable bede; Apr 5th, 2006 at 07:56 AM.

    Parksie

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