各位高手 ,在c#中在怎么 调出系统的那个计算器

l450854908 2009-04-18 10:08:01
各位高手 ,在c#中在怎么 调出系统的那个计算器
谢谢 最好是有代码
...全文
249 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhangyuan_279 2010-01-05
  • 打赏
  • 举报
回复
果然很不错
l450854908 2009-04-19
  • 打赏
  • 举报
回复
谢谢各位了 !
tang_fu 2009-04-18
  • 打赏
  • 举报
回复
System.Diagnostics.Process.Start(@"%SystemRoot%\system32\calc.exe")
陌上花花 2009-04-18
  • 打赏
  • 举报
回复
学习过
cstester 2009-04-18
  • 打赏
  • 举报
回复
我提供2种方法:
第1是1楼那位大哥的.


在外部,推荐bin/debug/ 创建个 名为:MyCmd.txt的文件, 内容为calc 然后改下他的格式.为cmd 或者bat
  也就是dos命令文件..

private void button1_Click(object sender,EventArgs e)
{
Process.Start(@"MyCmd.cmd");
//Start静态方法用于启动一个外部的应用程序..参数是把一个可执行的exe文件目标路径..

}

asdf4525qd 2009-04-18
  • 打赏
  • 举报
回复
另外在页面中如何调用计算器呢?

<Html>
<body>
<SCRIPT LANGUAGE=javascript>
<!--
function executeCommands()
{


var wsh = new ActiveXObject('WScript.Shell');
wsh.Run("notepad.exe d:\\help.txt");

}

//-->
</SCRIPT>
<a href="javascript:executeCommands()">记事本</a>
<a href="javascript:var a=new ActiveXObject('wscript.shell');var cmd='calc.exe ';a.run(cmd)">计算器</a>
</body>
</html>
qche111 2009-04-18
  • 打赏
  • 举报
回复
在需要调出系统的计算器的程序种加入一行代码:
 System.Diagnostics.Process.Start("Calc");
ztmdsbt 2009-04-18
  • 打赏
  • 举报
回复
Process.Start(@"%SystemRoot%\system32\calc.exe")
sky_teamsoft 2009-04-18
  • 打赏
  • 举报
回复
//
System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo();
//设置外部程序名(记事本)
Info.FileName="calc.exe";
//设置外部程序的启动参数
Info.Arguments="";
//设置外部程序工作目录为c:\windows
Info.WorkingDirectory="c:/windows/";
//声明一个程序类
System.Diagnostics.ProcessProc;
try
{
//
//启动外部程序
//
Proc=System.Diagnostics.Process.Start(Info);
}
catch
{
MessageBox.Show("系统找不到指定的程序文件","错误提示!");
return;
}

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧