开发者

How to make a download to dialogbox

I have a file that can be saved to a portable device. I would like to know how I could create a DialogBox to select a portable device to save my file to. This is very similar to a save, as DialogBox except the file already exists.

Perhaps better said, I need to be able to download to a Dial开发者_Python百科ogBox.

How can I achieve this?


"Download to a dialog box" makes little sense. There is no reason why a SaveFileDialog couldn't do the job. If you like to encourage the user to pick a removable drive as the save location then assign the SaveFileDialog.InitialDirectory property. You can find out what drives are removable by using the System.IO.DriveInfo class. Its DriveType property tells you what kind of drive it is.


You need to use the FileDialog class to display two FileDialogs. First, have the user select the file to copy. Next, have the user select the location where the file is to be copied (e.g. portable USB thumb drive).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜