如何使用系统运行? [英] How to use system run ?
本文介绍了如何使用系统运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我的Windows窗体中有一个按钮,我希望它能够执行此操作。
Hello, I have a button in my windows form, and I want it to do this.
Googlechrome.Show()
但这是不可能的!!所以我有了一个想法,就像这样,Button one打开System.Run并在其中键入Googlechrome 。可执行程序 。但我不知道该怎么写。
我需要一个答案,谢谢:)
but thats impossible!!, so I had an idea and it is like this, Button one opens System.Run and types in it Googlechrome.exe . but I dont know what should I write .
I need an answer, thanks :)
推荐答案
创建一个空的HTML页面:
Create an empty HTML page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>MY Downloads
</title>
</head>
<body>
</body>
</html>
将其保存在您可以找到的地方: D:\ Temp\blank.html
会这样做。
然后只需
Save it somewhere you can find it: D:\Temp\blank.html
will do.
Then just
Process.Start("D:\Temp\blank.html")
这将启动系统的默认浏览器,并打开空白文件。
That'll start the default browser for the system, and open the blank file.
这篇关于如何使用系统运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文