| |

VerySource

 Forgot password?
 Register
Search
View: 719|Reply: 6

Still the problem of drag drop

[Copy link]

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-1-7 00:20:02
| Show all posts |Read mode
On the tree in my form, drag a node to the resource manager or the seat, so that you can copy things over.
Main question 1: How to implement drag-out
          2: How do I know the target position I dragged is the folder path of the destination
Thank you.
Reply

Use magic Report

0

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-7 06:42:01
| Show all posts
Forget the grammar

There is a property in the parameter of the drag event

(object sender, e)
{
   e.xxxxx // take its path
   e.xxxxx // whichever type
}
Reply

Use magic Report

1

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 Invalid IP Address

Post time: 2020-1-10 12:45:01
| Show all posts
private void treeView1_DragDrop (object sender, System.Windows.Forms.DragEventArgs e)
{
TreeNode node = treeView1.GetNodeAt (e.X, e.Y);
}
Reply

Use magic Report

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

 Author| Post time: 2020-1-11 16:09:01
| Show all posts
Can you be more detailed?
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-16 09:18:01
| Show all posts
Wild goose leaving marks ...
Reply

Use magic Report

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

 Author| Post time: 2020-1-23 21:27:01
| Show all posts
Maybe you understand what I mean wrong, I mean, drag the nodes on your treeview into the resource manager for the copy operation, my nodes are all folders, the copy operation can solve it by itself, the problem is Where is the target location? How do I know that he may be dragged to the desktop, it may be dragged to the C drive, D drive or the subfolder below
Reply

Use magic Report

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

 Author| Post time: 2020-8-14 10:15:02
| Show all posts
The problem is solved by itself, it seems that the target path cannot be obtained. However, Microsoft has its own set of methods, and we do not need to obtain its target path.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list