Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to write my own EventHandle ?

How to write my own EventHandle ?

Scheduled Pinned Locked Moved C#
helptutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fu0
    wrote on last edited by
    #1

    Many Controls/Class have their own EventHandle , Such as Button.Click ,... i want to write my own EventHandle for my own class. but i dont understand it too much. The samples on MSDN are a bit difficult for me. are there some article concerning on this issue ?

    S E 2 Replies Last reply
    0
    • F fu0

      Many Controls/Class have their own EventHandle , Such as Button.Click ,... i want to write my own EventHandle for my own class. but i dont understand it too much. The samples on MSDN are a bit difficult for me. are there some article concerning on this issue ?

      S Offline
      S Offline
      sreejith ss nair
      wrote on last edited by
      #2

      It's is pretty easy to go for Custom Events( Own Event) in .NET. You need to cover few other techinics,if you want to go for this sort Custom Events and Event Handlers. You need to declare a deletegate for the event. Then need to encapsulate your code(Own Event handler code) into that delegate. Once you finish this, then you can declare an event of your delegate type. Then try to use your event where ever you want. I seen lot of same question in CP discussion. And i know this much information is not sufficient for you people. Anyhow wait, in a couple of days i will write a nice article on Custom Events and Handling . For the time being you can refer this articles. Custom Events Sreejith Nair [ My Articles ]

      1 Reply Last reply
      0
      • F fu0

        Many Controls/Class have their own EventHandle , Such as Button.Click ,... i want to write my own EventHandle for my own class. but i dont understand it too much. The samples on MSDN are a bit difficult for me. are there some article concerning on this issue ?

        E Offline
        E Offline
        EssOEss
        wrote on last edited by
        #3

        There is an entire caregory on this topic. See "Delegates and Events".

        A 1 Reply Last reply
        0
        • E EssOEss

          There is an entire caregory on this topic. See "Delegates and Events".

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          Events and delegates[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups