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. ow to using public event in UserControl

ow to using public event in UserControl

Scheduled Pinned Locked Moved C#
help
4 Posts 3 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.
  • T Offline
    T Offline
    tinh cau
    wrote on last edited by
    #1

    Help me

    T S M 3 Replies Last reply
    0
    • T tinh cau

      Help me

      T Offline
      T Offline
      tinh cau
      wrote on last edited by
      #2

      Help me

      1 Reply Last reply
      0
      • T tinh cau

        Help me

        S Offline
        S Offline
        S Senthil Kumar
        wrote on last edited by
        #3

        Just like any other event.

        public delegate void EventHandler(object o, EventArgs e);

        public class MyUserControl : UserControl
        {
        public event EventHandler OnEvent;
        }

        Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        1 Reply Last reply
        0
        • T tinh cau

          Help me

          M Offline
          M Offline
          MoustafaS
          wrote on last edited by
          #4

          You mean how to init it ?, or how to use it in the parent control ?,if the first, then it has been answered, otherwise :

          MyUserControl con = new MyUserControl();
          con.MyEvent+=new EventHandler(Pointer);

          .

          "Praying." Is this only what I can do for him ?

          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