|
-
Jul 11th, 2000, 01:55 AM
#1
Thread Starter
Member
if I drop a file on the .exe of my application
How can I get the file name that I droped.
Anybody help!
-
Jul 11th, 2000, 02:07 AM
#2
Frenzied Member
Say You Want to detect a drop on a picturebox (It doesn't really matter what controll you use but Picture1 is used in the example. Set it's OLEDropMode Property to 1 - Manual then add this code
Code:
Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim varTemp As Variant
For Each varTemp In Data.Files
MsgBox varTemp
Next varTemp
End Sub
This will give you a message of the filename of each file that's dropped into your picturebox. You can manipulate the files as you like from theire names, not just Message them.
-
Jul 11th, 2000, 07:29 AM
#3
Thread Starter
Member
That's working if my application is open! But in my case I want to drop the file on my application (not started) in Windows Explorer
Thanks Sam Finch
Anybody Help!
-
Jul 11th, 2000, 07:34 AM
#4
Frenzied Member
I think you Can use Command$ to do that,
anywhere in Your Code Should bring up the name of the file Dropped on it, I'm not sure what it'll do If you drop multible Files on it though. Probably have a big string with the names delimited by commas
-
Jul 11th, 2000, 10:08 AM
#5
Thread Starter
Member
Big thanks
Big Thanks Sam Finch
And the Answer to your question is : a big string and space delimited. The small file format(8.3) is use.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|