如何通过C#程序打开程序,并给这个方案重点 [英] how to open program through C# program and give this program focus

查看:259
本文介绍了如何通过C#程序打开程序,并给这个方案重点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过C#程序(Windows Mobile的)打开程序并给出该方案的重点。

How to open program through C# program (Windows Mobile) and give this program focus ?

修改通过MarkJ :金说感谢的Process.Start建议,但由于某些原因的程序仍不能获得焦点。

EDIT by MarkJ: Gold says thanks for Process.Start suggestions, but for some reason the program still doesn't get the focus.

在此先感谢,

Thanks in advance, Gold

推荐答案

您可以通过调用 进程启动程序。开始 ,像这样的:

You can launch a program by calling Process.Start, like this:

Process.Start(programPath);

您还可以通过在一个文件中(如Word文档),甚至是一个网站,它会在用户的机器上的文件类型的默认程序自动启动。

You can also pass in a file (eg, a Word document), or even a web site, and it will automatically launch in the default program for that file type on the user's machine.

当你调用的Process.Start ,程序会自动接收焦点。

When you call Process.Start, the program should automatically receive focus.

这篇关于如何通过C#程序打开程序,并给这个方案重点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆