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. Raise control events

Raise control events

Scheduled Pinned Locked Moved C#
help
5 Posts 2 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
    Tanuja123
    wrote on last edited by
    #1

    I am having problem with control events.I am unable to raise overriden paint event.drag& drop event and mouse events.The control is dropped on a designer at runtime i.e control can be moved freely on the designer at runtime. used delegate to raise the event but not working...

    M 2 Replies Last reply
    0
    • T Tanuja123

      I am having problem with control events.I am unable to raise overriden paint event.drag& drop event and mouse events.The control is dropped on a designer at runtime i.e control can be moved freely on the designer at runtime. used delegate to raise the event but not working...

      M Offline
      M Offline
      Martin 0
      wrote on last edited by
      #2

      Hello, Looks like you forgot to call the base.xxx Method of the overriden events. like:

      protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
      {
      //Your code

      base.OnPaint;
      

      }

      Hope that helps! All the best, Martin

      T 1 Reply Last reply
      0
      • M Martin 0

        Hello, Looks like you forgot to call the base.xxx Method of the overriden events. like:

        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
        //Your code

        base.OnPaint;
        

        }

        Hope that helps! All the best, Martin

        T Offline
        T Offline
        Tanuja123
        wrote on last edited by
        #3

        I have called base.xxx method. Eventhough i have kept a breakpoint at the beginning of the method ,it doesn't go to the method itself.

        1 Reply Last reply
        0
        • T Tanuja123

          I am having problem with control events.I am unable to raise overriden paint event.drag& drop event and mouse events.The control is dropped on a designer at runtime i.e control can be moved freely on the designer at runtime. used delegate to raise the event but not working...

          M Offline
          M Offline
          Martin 0
          wrote on last edited by
          #4

          snoby wrote:

          The control is dropped on a designer at runtime

          Ohh, now I understand. Youre control is in design mode, or not? Don't think that the event's are fired in this mode. Sorry for not realy helping. All the best, Martin

          T 1 Reply Last reply
          0
          • M Martin 0

            snoby wrote:

            The control is dropped on a designer at runtime

            Ohh, now I understand. Youre control is in design mode, or not? Don't think that the event's are fired in this mode. Sorry for not realy helping. All the best, Martin

            T Offline
            T Offline
            Tanuja123
            wrote on last edited by
            #5

            Tell me how to get updated Coordinate position when control is dragged & dropped on any part of designer without using events.On designer also events are not getting raised.

            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