我们可以暂停和恢复文件副本吗?
- 使用 :
3 Button
_ 1 OpenFileDialog
_ 1FolderBrowserDialog
进口:
Imports System.IO
代码 :
Private Sub BTN_filedialog_Click(sender As Object, e As EventArgs) Handles BTN_filedialog.Click OpenFileDialog1.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" 'Cette clé de registre ouvre "Ordinateur" OpenFileDialog1.Title = OpenFileDialog1.FileName = "" OpenFileDialog1.Filter = _ "All files (*.*)|*.*|txt files (*.txt)|*.txt" Dim dlgResult = OpenFileDialog1.ShowDialog() If dlgResult <> System.Windows.Forms.DialogResult.OK Then MessageBox.Show("File Error " & dlgResult) End If End Sub Private Sub BTN_folderbrowserdialog_Click(sender As Object, e As EventArgs) Handles BTN_folderbrowserdialog.Click Dim dlgResult = FolderBrowserDialog1.ShowDialog() If dlgResult <> System.Windows.Forms.DialogResult.OK Then MessageBox.Show("Folder Error " & dlgResult) End If End Sub Private Sub BTN_copyfile_Click(sender As Object, e As EventArgs) Handles BTN_copyfile.Click My.Computer.FileSystem.CopyFile( _ OpenFileDialog1.FileName, _ FolderBrowserDialog1.SelectedPath & "\" & _ OpenFileDialog1.SafeFileName, _ FileIO.UIOption.AllDialogs) End Sub
我用My.Computer.FileSystem.CopyFile
在 Windows 8 中,在“复制”对话框内,有一个暂停按钮。
怎么称呼这个“事件”?
我不知道这是否可能,但是我们可以将参数发送到某个 Lib/. dll来模拟按下暂停键的动作?
Ps:对不起我的英语不好,我是法国人。