473,657 Members | 2,517 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drag&Drop File to Explorer

Hello,

i'm in real trouble and don't know how to handle it! May someone can give me
a hint? Following problem: In my application you can drag&drop a file from
the explorer. In my application this file will be encrypted and then you
should be able to drag&drop the file from the application to the explorer.
How can i code the last step ?!? I have tried it with DoDragDrop but without
success :-(

TIA
Marco
Nov 20 '05 #1
1 1671
Cor
Hi Marco,

I did once made this sample, but it is the other direction, but maybe it
helps you?

Cor
\\\
'Copy with windows explore some files and than this
Private Sub Button1_Click(B yVal sender _
As Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim folderbrowserDi alog1 As New FolderBrowserDi alog
Dim iData As IDataObject = Clipboard.GetDa taObject()
If iData.GetDataPr esent(DataForma ts.FileDrop) Then
Dim clipbrd As String() =
DirectCast(iDat a.GetData(DataF ormats.FileDrop ), String())
Dim i As Integer
folderbrowserDi alog1.ShowDialo g()
For i = 0 To clipbrd.Length - 1
If System.IO.File. Exists(folderbr owserDialog1.Se lectedPath _
& System.IO.Path. GetFileName(cli pbrd(i))) Then
System.IO.File. Move(folderbrow serDialog1.Sele ctedPath & _
"\" & _
System.IO.Path. GetFileName(cli pbrd(i)), _
folderbrowserDi alog1.SelectedP ath & "temptemptemp.t emp")
End If
System.IO.File. Copy(clipbrd(i) , folderbrowserDi alog1.SelectedP ath &
_
"\" & _
System.IO.Path. GetFileName(cli pbrd(i)))
If System.IO.File. Exists(folderbr owserDialog1.Se lectedPath _
& "temptemptemp.t emp") Then
System.IO.File. Delete(folderbr owserDialog1.Se lectedPath & _
"temptemptemp.t emp")
End If
Next
End If
End Sub
///


i'm in real trouble and don't know how to handle it! May someone can give me a hint? Following problem: In my application you can drag&drop a file from
the explorer. In my application this file will be encrypted and then you
should be able to drag&drop the file from the application to the explorer.
How can i code the last step ?!? I have tried it with DoDragDrop but without success :-(

TIA
Marco

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7624
by: Karsten Schramm | last post by:
Hi, if I drag an Outlook.MailItem to a Windows-Explorer window a <subject>.msg file will be created. Now I try to drag & drop a mail item to my own WinForm app. Unfortunately it doesn't work. In the "drop event" are eight DataFormats (e.Data.GetFormats()) but the important one (imho) "FileContents" is "Nothing"/"null".
1
3253
by: Ed Sutton | last post by:
I am looking for a WinForms drag and drop example that shows how to implement dragging from a WinForm treeView and dropping on another application. I have drag & drop working from within the treeView. Example Use Cases: 1 - Dragging and dropping a file on an Outlook email message to add a file attachment 2 - Dragging and dropping a file on the Windows Explorer to copy a file
2
9195
by: Grey | last post by:
I need to design a workflow application with C#. I want to design an UI with some workflow components which they can be drag & drop anywhere in order to design the workflow for the application users. Moreover, when the user double click on the component, they can define some routing rules for the process. Is it possible to have such fancy UI in C#?? Any reference sites or tutorial?? Million Thanks.
1
1050
by: Zyrthofar Blackcloak | last post by:
Hi I have a set of four radiobuttons, and I want to be able to move and copy between them using Drag&Drop operations. This works perfectly, but now I want to see the source radiobutton's .Text property when dragging it, just like when you drag a file in Windows Explorer. (ie. I want the cursor, and just behind it, the .tag that moves with it) Is there a better way to do this than dynamically create a cursor? I have been looking at some...
1
2298
by: Terry Olsen | last post by:
My first time using TreeViews. I have TreeView1 set up to display my directory structure just like Windows Explorer. I can drag & drop files and folders over to TreeView2. I can re-arrange the structure in TreeView2 (putting files in different folders and such...like you do when you create a structure for burning a CD). I have two questions. 1. How can I remember the full path from TreeView1 (when it comes time to actually do...
1
5371
by: Sim | last post by:
Hello NG, I try to use drag and drop function between two list views. For this I found following code: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchimpdragdrop.asp It works fine, but I have another problem. I want to create functionality like a Windows Explorer. This means, if I select some items from list view No 1 and drag&drop this to the list view No 2, then I want to mark automatically
3
3981
by: Hartmut Dippon | last post by:
Hi all, I hope somebody can help me with following problem: I have an application where I can drag&drop files/dirs from within explorer onto my form. If multiple files/dirs are selected I can see that the order I get in my drop event is not always the same as displayed in the explorer window. Further more the order changes depending on how many files/dirs are
2
1715
by: fniles | last post by:
Is there a drag & drop even on tag SELECT, like maybe something like <SELECT ondragdrop={go to function drag & drop}>) ? Thank you
2
2640
by: deccio | last post by:
I have create an activex Control with Visual studio 2005 and framework 2.0 in c# to add drag & drop functionality to upload multi file. When I use it in a windows form it work fine. Infact if I select 3 files from a windows explorer and I move it in a listbox in my activeX, I find my 3 files added in the listbox but if I use my activeX in a web form and I select 3 file from a windows explorer in the listBox find only 1 file the file on...
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.