问题描述
我的代码有问题所以我想在WPF VB.net上使用命令cmd(shell)复制文件,但没有任何反应,所以这就是代码:
我尝试过:
私有子执行者(发件人为对象,e为RoutedEventArgs)处理button1。点击
Dim myProcess As New Process()
myProcess.StartInfo.FileName =cmd.exe'l'application
myProcess.StartInfo .Arguments =/ c copy C:\ Users\FC\Desktop\t.txt C:\ Users\FC\Desktop\\\
n\\\
v
$ b $b'lesparamètrespassésàl'application
myProcess.StartInfo.CreateNoWindow = True
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
myProcess.Start()'lance le process
myProcess.WaitForExit()'参加qu'ilsoitendéavantd'aller plus loin
myProcess。关() 'ferme le process
End Sub
Hi, i have a problem in my code so i want to copy a file using a command cmd (shell) on WPF VB.net but nothing happen ,so this is the code :
What I have tried:
Private Sub executer(sender As Object, e As RoutedEventArgs) Handles button1.Click
Dim myProcess As New Process()
myProcess.StartInfo.FileName = "cmd.exe" 'l'application
myProcess.StartInfo.Arguments = "/c copy C:\Users\FC\Desktop\t.txt C:\Users\FC\Desktop\nn\nv"
'les paramètres passés à l'application
myProcess.StartInfo.CreateNoWindow = True
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
myProcess.Start() 'lance le process
myProcess.WaitForExit() 'attend qu'il soit terminé avant d'aller plus loin
myProcess.Close() 'ferme le process
End Sub
推荐答案
这篇关于在WPF VB.NET上命令cmd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!