如何在Visual Studio 2010 C#中使用OLE? [英] How use OLE In Visual Studio 2010 C# ?
本文介绍了如何在Visual Studio 2010 C#中使用OLE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在VB6或delphi xe中用于ole文件以及Powerpoit和Excell ...我使用了
但是现在我在VS 2010中找不到此工具.
例子:
在VB6中
vb6中的图片ole
在Delphi xe中
Delphi xe中的图片ole
Visual Studio中的ole吗?!
解决方案
您可以看一下以下示例:
http: //blogs.artinsoft.net/Mrojas/archive/2012/01/23/Quick-replacement-for-the-VB6-OLE-Container-Control-in-NET.aspx [ http://support.microsoft.com/kb/304662 [ http://code.msdn.microsoft.com/windowsdesktop/OLE-DB-Sample-c7202941 [^ ]
http://stackoverflow.com/questions/3549796/calling-an- old-ole-component-from-c-sharp [ ^ ]
http://bytes.com/topic/c-sharp/answers/869355- Saving-image-ole-object [ ^ ]
在Visual Studio 2010中创建Windows应用程序,然后将以下代码复制粘贴到Form.cs文件中,然后运行该应用程序.
使用系统; 使用 System.Collections.Generic; 使用 System.ComponentModel; 使用 System.Data; 使用使用System.Drawing; 使用 System.Linq; 使用 System.Text; 使用使用System.Windows.Forms; 使用 System.Diagnostics; 使用使用System.Threading; 命名空间 WindowsFormsApplication1 { 公共 部分 class Form1:表单 { 公共 Form1() { InitializeComponent(); } 私有 无效 button1_Click(对象发件人,EventArgs e) { // 对excel使用excel.exe,对记事本使用notepad.exe 进程p = Process.Start(" ); Thread.Sleep( 500 ); // 允许进程打开其窗口 } } }
hi
I asked the question in the wrong place, I''m sorry. My first question is
In VB6 or delphi xe for the ole files and Powerpoit and Excell ... I used
But now I can not find this tool in VS 2010
Example :
in VB6
picture ole in vb6
in Delphi xe
Picture ole in Delphi xe
ole in Visual Studio ?!
解决方案
You can look this example:
http://blogs.artinsoft.net/Mrojas/archive/2012/01/23/Quick-replacement-for-the-VB6-OLE-Container-Control-in-NET.aspx[^]
or one an alternative example about using the WebBrowser control to open Office documents in Visual C# 2005 or in Visual C# .NET:
http://support.microsoft.com/kb/304662[^]
Also read this:
http://code.msdn.microsoft.com/windowsdesktop/OLE-DB-Sample-c7202941[^]
http://stackoverflow.com/questions/3549796/calling-an-old-ole-component-from-c-sharp[^]
http://bytes.com/topic/c-sharp/answers/869355-saving-image-ole-object[^]
Create a windows Application in Visual studio 2010 and copy paste the below code in Form.cs file and run the application.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Threading; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //Use excel.exe for excel and notepad.exe for notepad Process p = Process.Start("powerpnt.exe"); Thread.Sleep(500); // Allow the process to open it's window } } }
这篇关于如何在Visual Studio 2010 C#中使用OLE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文