I Cant figure out drag and drop!

Posted on 1998-09-26
Medium Priority
Last Modified: 2010-04-06
Can anyone explain to me how to use drag and drop within a delphi program.
thanks in advance.
Mike Ross
Question by:mykyl
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 10

Expert Comment

ID: 1340877
Tell me your e-mail address and I'll send you some code....
LVL 10

Accepted Solution

viktornet earned 100 total points
ID: 1340878
Here is the code but anyway, if you need the project tell me your e-mail address and I'll send ya somethin'
ListBox1, and ListBox2 are TListBox 'es
//Set listbox1.DragMode := dmAutomatic;

procedure TForm1.ListBox2DragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
  Accept := Sender is TListBox;

procedure TForm1.ListBox2DragDrop(Sender, Source: TObject; X, Y: Integer);
  str : string;
  str := listbox1.items[listbox1.itemindex];
  if listbox2.items.indexof(str) < 0 then

Viktor Ivanov

Author Comment

ID: 1340879
My email address is
mike @viprocess.ndirect.co.uk
LVL 10

Expert Comment

ID: 1340880
Does it work now???


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question