Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:30:48+00:00 2026-05-25T09:30:48+00:00

I’ve implemented the following procedure and it works properly when I compile it on

  • 0

I’ve implemented the following procedure and it works properly when I compile it on my computer running windows vista, computer #1. If I share the created .exe file to another computer running win7, computer #2, it runs fine aswell. The problem is when I let the computer #2 compile it, it wont simply recognize that anything’s dropped on the application. There’s no response at all in this code. It’s built and compiled without errors or warnings.
I’ve been searching the net for a while without finding anything that explains why this happens or someone else with this problem.

Both computers use Delphi 2010 with the same components installed.

  1. Is this the way to go to allow the user to drop files onto the application? If not, how should it be done nowdays?
  2. Any ideas why it works when it’s compiled on computer #1 but not computer #2? (The program works properly on both computers when compiled on computer #1)

Any help or comment is highly appreciated.

procedure TfMainForm.WMDROPFILES(var msg: TWMDropFiles);
const
  MaxLength = 255;

var
  nFiles : integer;
  i : integer;
  fileName : array [0..MaxLength] of char;
  fileNames : TStringArray;

begin
  // Get number of files dropped
  nFiles := DragQueryFile(msg.Drop,  $FFFFFFFF, fileName, MaxLength);

  // Get filenames
  SetLength(fileNames, nFiles);
  for i := 0 to nFiles - 1 do begin
    DragQueryFile(msg.Drop, i, fileName, MaxLength);
    fileNames[i] := fileName;
  end;

    // Add files
  projectHandler.addFiles(fileNames);

  //release memory
  DragFinish(msg.Drop);
end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:30:48+00:00Added an answer on May 25, 2026 at 9:30 am

    I’m going to take a wild guess that if you are running from within the IDE on computer #2. I bet that if you compile on computer #2 but start the executable from explorer rather than from the IDE, it works. The final piece of the jigsaw is that I bet you are running your IDE on computer #2 as administrator.

    On Vista and Windows 7 you can’t send messages to a process with a higher integrity level. If your process is being run as administrator then it will have a higher integrity level than explorer and so won’t accept the dropped files.

    If my guess is correct I recommend that you stop running Delphi as administrator, it doesn’t need this.

    As for whether or not WM_DROPFILES is a reasonable approach, I see no problems with using it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.