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 Generate events from strings

How to Generate events from strings

Scheduled Pinned Locked Moved C#
tutorial
3 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.
  • A Offline
    A Offline
    Amar Chaudhary
    wrote on last edited by
    #1

    Is there is any way to generate the events form string values such as I have string s = "Paint" is there any code that if the control have paint event it is generated and a particular method is called Thanks and Regards Amar Chaudhary

    It is Good to be Important but! it is more Important to be Good

    U R 2 Replies Last reply
    0
    • A Amar Chaudhary

      Is there is any way to generate the events form string values such as I have string s = "Paint" is there any code that if the control have paint event it is generated and a particular method is called Thanks and Regards Amar Chaudhary

      It is Good to be Important but! it is more Important to be Good

      U Offline
      U Offline
      Urs Enzler
      wrote on last edited by
      #2

      Try using reflection: Reflect the Paint event on the object and invoke it.

      -^-^-^-^-^- no risk no funk ................... please vote ------>

      1 Reply Last reply
      0
      • A Amar Chaudhary

        Is there is any way to generate the events form string values such as I have string s = "Paint" is there any code that if the control have paint event it is generated and a particular method is called Thanks and Regards Amar Chaudhary

        It is Good to be Important but! it is more Important to be Good

        R Offline
        R Offline
        RaviBattula
        wrote on last edited by
        #3

        use this type of approach In the method void Method() { PaintTemp_Paint+=new new System.Windows.Forms.PaintEventHandler(this.PaintTemp_Paint); }

        Ravi

        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