DragEnter Does Not Fire?

L

Leon_Amirreza

I have a DataGridView on the form with AllowDrop = true when I drag a file
from windows Explorer on DataGridView Mouse Pointer becomes a No Icon And
DragEnter Does not Fire!

It fires when I Initiate a Drag Drop from within the C# Application!

What Should I do?
 
C

Cor Ligthert[MVP]

Leon,

Can you show us the documentation where is written that you can drag a file
to a to DataGridView (or do you mean an image)?

Cor
 
L

Leon_Amirreza

Sorry I dont Get it?
I thought the DragEnter Should get Fired every time I dragged over it no
matter what I drag!?

If no, What should I do then, to get the names of files dragged into my
application from Windows Explorer?
 
C

Cor Ligthert[MVP]

For sure not use a DataGridView as that is mainly intended for a Database.

A listview like in explorer itself will in my ide be definitly a better
choise.

Cor
 
L

Leon_Amirreza

Still Problem ramains:
The ListView DragEnter Does not Fire!?
What Should I do?
 
C

Cor Ligthert[MVP]

There are samples on Internet how to drag from Explorer to the Listview, in
fact it is the same control
 
L

Leon_Amirreza

I have seen many drag drop examples that use DragEnter and its event
argument BUT within the same application!
I havent seen any that uses drag from another App into your .Net App!

could you possibly give an example URL!
 
G

G Himangi

Are you setting AllowDrop=true? Once that is set, using:
e.Effect= DragDropEffects.Copy

in DragEneter handler should work

--------
- G Himangi, LogicNP Software http://www.ssware.com
Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder
Browsing Functionality (.Net & ActiveX Editions).
EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and
MFC/ATL/C++
EZShellExtensions: Develop all shell extensions,explorer bars and BHOs
rapidly in .Net & MFC/ATL/C++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top