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. Moving controls in realtime

Moving controls in realtime

Scheduled Pinned Locked Moved C#
helpquestion
3 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
    Tony Pottier
    wrote on last edited by
    #1

    Hi, I'm using the events mousemove/mousedown/mouseup to move a panel in my winform in realtime. This is working fine, but this panel may have other controls like labels. The events are not raised if the user tries to click on a label or any object inside the panel. Is there any way to get around this problem without registering all the controls on the panel with the mouse events? (like a parameter that would "transmit" the events to the parent controller) Regards, Tony

    L 1 Reply Last reply
    0
    • T Tony Pottier

      Hi, I'm using the events mousemove/mousedown/mouseup to move a panel in my winform in realtime. This is working fine, but this panel may have other controls like labels. The events are not raised if the user tries to click on a label or any object inside the panel. Is there any way to get around this problem without registering all the controls on the panel with the mouse events? (like a parameter that would "transmit" the events to the parent controller) Regards, Tony

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      i tried it once and i found that the only solution was to add the handle to all the chld controls

      foreach (Control c in myPanel.Controls){
      c.Event += delegateMethod();
      }

      Saludos!! ____Juan

      T 1 Reply Last reply
      0
      • L Lost User

        i tried it once and i found that the only solution was to add the handle to all the chld controls

        foreach (Control c in myPanel.Controls){
        c.Event += delegateMethod();
        }

        Saludos!! ____Juan

        T Offline
        T Offline
        Tony Pottier
        wrote on last edited by
        #3

        I see, thank you!

        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