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. Draw Line

Draw Line

Scheduled Pinned Locked Moved C#
help
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.
  • D Offline
    D Offline
    Dushan123
    wrote on last edited by
    #1

    I am populating two buttons at the run time to panel. These buttons can freely move to any position of panel by dragging it. I need to join these buttons by using a line. This line should be move according to the button move. Please Help me to do this

    Dushan Perera

    N D 2 Replies Last reply
    0
    • D Dushan123

      I am populating two buttons at the run time to panel. These buttons can freely move to any position of panel by dragging it. I need to join these buttons by using a line. This line should be move according to the button move. Please Help me to do this

      Dushan Perera

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Are you asking someone to code this for you? What have you done so far? Drawing a line requires tow points, pick them and draw the line, update the points when the buttons move.


      only two letters away from being an asset

      1 Reply Last reply
      0
      • D Dushan123

        I am populating two buttons at the run time to panel. These buttons can freely move to any position of panel by dragging it. I need to join these buttons by using a line. This line should be move according to the button move. Please Help me to do this

        Dushan Perera

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        All you need to do is handle the panels MouseDown, MouseMove and MouseUp along with a paint(I dont remember if it is panel's or form's event) event wisely. And yes you will also need some coordinate geometry. Good luck.

        C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void "Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding

        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