如何在 C# 程序的面板中运行另一个应用程序? [英] How can I run another application within a panel of my C# program?

查看:19
本文介绍了如何在 C# 程序的面板中运行另一个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读有关如何从 C# 程序 (Process.Start()) 内部触发应用程序的大量信息,但我无法找到有关如何在面板中运行此新应用程序的任何信息我的 C# 程序.例如,我希望单击按钮在我的应用程序内而不是在外部打开一个 notepad.exe.

I've been reading lots on how to trigger an application from inside a C# program (Process.Start()), but I haven t been able to find any information on how to have this new application run within a panel of my C# program. For example, I'd like a button click to open a notepad.exe WITHIN my application, not externally.

推荐答案

我不知道这是否仍然是推荐使用的东西,但对象链接和嵌入"框架允许您将某些对象/控件直接嵌入到你的申请.这可能仅适用于某些应用程序,我不确定记事本是否是其中之一.对于像记事本这样非常简单的东西,您可能会更轻松地使用由您使用的任何媒体(例如 WinForms)提供的文本框控件.

I don't know if this is still the recommended thing to use but the "Object Linking and Embedding" framework allows you to embed certain objects/controls directly into your application. This will probably only work for certain applications, I'm not sure if Notepad is one of them. For really simple things like notepad, you'll probably have an easier time just working with the text box controls provided by whatever medium you're using (e.g. WinForms).

这是一个指向 OLE 信息的链接以开始使用:

Here's a link to OLE info to get started:

http://en.wikipedia.org/wiki/Object_Linking_and_Embedding

这篇关于如何在 C# 程序的面板中运行另一个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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