Drag a file between the resource manager window and the control

Source: Internet
Author: User

Dragging a file from the control to the resource manager for copying is a convenient function.

There are two ways to implement this function:

1. Use System. Windows. Forms. Control. dodragdrop (New dataobject (dataformats. filedrop, strfiles), dragdropeffects. Copy ),Note:Strfiles must be a string array of all file paths (including file names ).String ArrayCannot be a string.

2. Use the dodragdrop function of a control, such as gridcontrol1.dodragdrop (New dataobject (dataformats. filedrop, strfiles) and dragdropeffects. copy ).

Drag the files in the Resource Manager to the control for storage, which is much simpler and ready-made on the Internet.CodeYou only need to respond to the dragdrop event of the control and then obtain the dragged file for upload.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.