袍哥找到问题了为什么开机启动后焦点没在系统上,我之前请教过你网络连接的情况
我在beforeopenproject里面
Dim p As new Process()
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.UseShellExecute = False '关闭Shell的使用
p.StartInfo.RedirectStandardInput = True '重定向标准输入
p.StartInfo.RedirectStandardOutput = True '重定向标准输出
p.StartInfo.RedirectStandardError = True '重定向错误输出
p.StartInfo.CreateNoWindow = True '设置不显示窗口
p.Start()
p.StandardInput.WriteLine( "net use \\192.168.44.202\e TBFCfs.2109 /user:Administrator",0)
p.StandardInput.WriteLine("exit")
If FileSys.FileExists("\\192.168.44.202\e\空滤数据库\空滤数据库.mdb") = False Then
MessageBox.Show("数据库连接失败,准备启动备用系统!,该情况请联系班长")
E.Cancel = True
End If
这个代码导致的,导致cmd一直在后台运行,应该怎么关掉,让焦点回到系统上
[此贴子已经被作者于2015/12/25 13:05:36编辑过]