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

  • Home
  • SEARCH
  • 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 336329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:13:56+00:00 2026-05-12T10:13:56+00:00

Using the ‘standard’ VCL drag and drop events OnDragOver and OnDragDrop, how can I

  • 0

Using the ‘standard’ VCL drag and drop events OnDragOver and OnDragDrop, how can I distinguish between “Copy” and “Move” operations?

I don’t seem to have a TDragType available, and the keyboard Shift state isn’t passed to these events.

  • 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-12T10:13:56+00:00Added an answer on May 12, 2026 at 10:13 am

    This is not something you can determine from the events because the events make no assumptions about your application needs or capabilities.

    Interpreting a particular drag/drop as having any particular semantics is the responsibility of the application itself – the OS cannot know how the application will react to the dropping of a file so can make no assumptions about what the dragging operation may imply for the user.

    For many applications there will be no distinction between copy/move, there will be just drag-and-drop.

    The copy/move distinction is something that Windows Explorer applies to file operations. For “vanilla” drag/drops it applies rules based on original and destination drive volumes – dragging/dropping files around on a volume is a move operation, by default. Dragging/dropping across volumes is a copy, by default.

    But these are only default rules determined by the application (Windows Explorer). The user can override these default using keyboard shortcuts during dragging and (most importantly) when dropping. But these are defined and interpreted by the particular application – i.e. Windows Explorer – not the OS.

    So, if you’re application is a drop target for files that may be dragged from Windows Explorer, and if it makes sense for your application to discriminate between copy and move, then you may need to support the same keyboard modifiers that Windows Explorer supports. I don’t believe these are modifiable (although I’d advise this be confirmed), so you could simply test the state of the Ctrl or Shift keys in your drag events:

    Ctrl         = COPY
    Shift        = MOVE
    Ctrl + Shift = MAKE SHORTCUT  (if this is applicable to your application)
    

    GetKeyState() can be used to directly interrogate the state of a specific key at any given moment in time.

    If a varying “default” behaviour is desired then you would have to apply your own tests to the source information to determine which default makes most sense (i.e. to mimic the Windows Explorer “volume boundary” default rules), or simply choose the most appropriate or intuitive default action for your application.

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

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using jQuery, one can easily find out whether a particular element is visible using
Using the HTML5 File API I can get the Binary String representation of a
Using Android TelephonyManager an application can obtain the state of data activity over the
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using WebViewBrush I can render web page content (it's screen shot) to e.g. Rectangle
Using PyGtk's IconView, I can set the icons to be reorderable by calling gtk.IconView.set_reorderable(True)
Using Highcharts, how can I select a point using it's id? For example, if
Using server-side C#, how can I convert a querystring to a JSON string of

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.