Solved

About Drag&Drop

Posted on 1999-01-10
2
139 Views
Last Modified: 2010-04-06
How can I make program with Drag&Drop process? For example: I want to make program whish will get filename and path of file which I drag forom Windows Explorer or my desktop?
Can you send me source code?
0
Comment
Question by:milmil
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1355800
Look in the delphi section of this page:

http://www.melander.dk/

It has a very good drag and drop component thats free with source code.

Cheers,

Raymond.
0
 
LVL 1

Expert Comment

by:martin_g
ID: 1355801
Hi,
Here's some code that worked for me copying files from a File List Box to a ChekList Box:

procedure TDSBMainForm.CheckListBox1DragDrop(Sender, Source: TObject; X,
  Y: Integer);
 begin
  AddFilesToList;
 end;


procedure TDSBMainForm.FileListBox1EndDrag(Sender, Target: TObject; X,
  Y: Integer);
begin
if Target <> nil then FileListBox1.Update;

end;

procedure TDSBMainForm.AddFilesToList;
var
 i,j:integer;
 OkayToAdd:Boolean;

begin
  For i:= 0 to FileListBox1.Items.Count -1 do
   if FileListBox1.Selected[i] then
   {check to see if the new item is already in the checklist box}
   begin
      OkayToAdd:=False;
      for j:=0 to CheckListBox1.Items.Count -1 do
        if ExpandFileName(FileListBox1.Items[i])=CheckListBox1.Items[j] then OkayToAdd:=true;
      if OkayToAdd<>true then
        CheckListBox1.Items.Add(ExpandFileName(FileListBox1.items[i]));
   end {if}
end;
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now