Results 1 to 5 of 5

Thread: Event Creation

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Posts
    3

    Question Event Creation

    Hi everybody,

    I added button object to datagird object, it apears on datagrid at run time properly.

    How can i create event for it??

    ex:
    button.click!!


    ur help will be appreciated!!!

  2. #2
    Lively Member
    Join Date
    Jan 2003
    Posts
    71
    I don't have any code to give you, but the .Net help files has a pretty good description. Look up AddHandler Keyword in the Help file and pick the topic - Writing Event Handlers. Looks pretty straightforward.

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Another way to understand the addhandler is to put a button on the form, double click it, then go to the code that is created for you by the IDE, it will show you how to create a handler for a button.

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    I was trying to work something out and realized that VB.NET handles events way differently than C#. I'll have to refer to my VB.NET book.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This should be done through WithEvents and AddHandler methods . Check out this example I've posted some time ago (very easy to understand). Just apply the same idea to what you are trying to do .

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