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. Windows Forms
  4. Drag Drop of controls in .net

Drag Drop of controls in .net

Scheduled Pinned Locked Moved Windows Forms
csharphelp
4 Posts 4 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.
  • S Offline
    S Offline
    S Aijaz
    wrote on last edited by
    #1

    i want to drag a control and drop it on some other position in the same form window. can any body please help me on that.

    N L N 3 Replies Last reply
    0
    • S S Aijaz

      i want to drag a control and drop it on some other position in the same form window. can any body please help me on that.

      N Offline
      N Offline
      Nuri Ismail
      wrote on last edited by
      #2

      Have a look at these articles: - C# Rect Tracker[^] - http://69.10.233.10/KB/cs/SharpFormEditorDemo.aspx[^] I hope this helps. :) Regards, Nuri Ismail

      1 Reply Last reply
      0
      • S S Aijaz

        i want to drag a control and drop it on some other position in the same form window. can any body please help me on that.

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

        Hint: Use the MouseDown, MouseMove and MouseUp events and change the Location property of the control.

        modified on Tuesday, November 17, 2009 10:36 AM

        1 Reply Last reply
        0
        • S S Aijaz

          i want to drag a control and drop it on some other position in the same form window. can any body please help me on that.

          N Offline
          N Offline
          Natza Mitzi
          wrote on last edited by
          #4

          I wrote something like this back in the day and I will look for it. But dragging controls is very demanding since they redraw all the time causing flickering and bad performance (at least in .net 2.0).You can show squares when you drag or implement it by adding custom redraw on bitmaps which may still cause problems, very complicates and has relatively poor performance. This is a big task and you should be looking for a nice peace of code to start with.Try looking for a custom drawn object source code it will be a good start. I don't know whether you should use an off the shelf product, check quality and pricing first. I found this here : Drag and Drop Image C#

          Natza Mitzi
          Analysis Studio - Statistical Analysis

          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