sharpdevelop的工具箱中添加已注册的ocx控件
2010-12-01 07:03
239 查看
1. Before you begin, there is a registry patch that can be found at [http://www.ebswift.com/Tidbits/] that lets you open any folder with a right-click from Windows Explorer, with all .Net environment variables set. This is much easier to use than manually setting up paths. The first step is to use the aximp.exe command line utility and create a COM interface wrapper. To do this you will have to have the .NET sdk installed to take advantage of the command line utilities. If you don 't use the registry patch you may also want to add the aximp.exe path to your environment path in your autoexe.bat file. The path is typically C:\Program Files\Microsoft.NET\SDK\v1.1\bin.
2. Open a console window and change the directory(folder) to the location you want to place the C# COM interface. At the command prompt type: aximp.exe c:\ <your activex path> \Activex_Filename.ocx. The import process will create two files, Activex_Filename.dll and AxActivex_Filename.dll. Remember that some ActiveX files can also have a .dll extension; for example, shdocvw.dll is the Internet Explorer ActiveX.
3. Start #develop and open a project. Activate the form design window. Right click on one of the Tool Scout tabs. From the drop down list choose Configure Sidebar. The Configure Sidebar window will open.
4. The left-hand pane displays a list of the available categories. By default three categories are listed: Windows Forms, Data, and Components. You can add the activeX component to one of these tabs or create a new one. To add to an existing category click on the name and skip to Step 4. To add a new tab, click the new button in the lower left corner. The New Category dialog box will open. Type the text you want displayed on the new Tool Scout tab. Click on your new category name in the list.
5. Click the Add Components button. The Add Components dialog box will be displayed. Click the Custom tab. Click the browser button to the right of the File Name textbox. The Open dialog box will appear. Use the Open explorer window and browse, locate, and select the AxActivex_Filename.dll file you created in Step 1.
6. The file path and name should now be displayed in the File Name textbox. Click the Show Components button. The components should now be displayed in the right-hand pane. Click the OK button.
7. The activeX components should now be available on the category tab you selected. Before you can place an instance of the control on your form, you must first change the form 's Font.Unit property to Point in the Property Scout.
8. You can now place an instance of the control on your form and have access to the properties and events in the Property Scout.
2. Open a console window and change the directory(folder) to the location you want to place the C# COM interface. At the command prompt type: aximp.exe c:\ <your activex path> \Activex_Filename.ocx. The import process will create two files, Activex_Filename.dll and AxActivex_Filename.dll. Remember that some ActiveX files can also have a .dll extension; for example, shdocvw.dll is the Internet Explorer ActiveX.
3. Start #develop and open a project. Activate the form design window. Right click on one of the Tool Scout tabs. From the drop down list choose Configure Sidebar. The Configure Sidebar window will open.
4. The left-hand pane displays a list of the available categories. By default three categories are listed: Windows Forms, Data, and Components. You can add the activeX component to one of these tabs or create a new one. To add to an existing category click on the name and skip to Step 4. To add a new tab, click the new button in the lower left corner. The New Category dialog box will open. Type the text you want displayed on the new Tool Scout tab. Click on your new category name in the list.
5. Click the Add Components button. The Add Components dialog box will be displayed. Click the Custom tab. Click the browser button to the right of the File Name textbox. The Open dialog box will appear. Use the Open explorer window and browse, locate, and select the AxActivex_Filename.dll file you created in Step 1.
6. The file path and name should now be displayed in the File Name textbox. Click the Show Components button. The components should now be displayed in the right-hand pane. Click the OK button.
7. The activeX components should now be available on the category tab you selected. Before you can place an instance of the control on your form, you must first change the form 's Font.Unit property to Point in the Property Scout.
8. You can now place an instance of the control on your form and have access to the properties and events in the Property Scout.
相关文章推荐
- OCX控件强行注册+可信任站点添加+可信任站点ActiveX安全设置启用+收藏夹
- Ocx 控件添加函数接口,注册控件
- Visual Studio 2010中添加注册控件的方法--OCX
- VC++注册,卸载OCX控件,以及判断是否注册
- C# (VS)实现多个DLL(OCX)控件注册的方法
- C#实现Dll(OCX)控件自动注册的两种方法 网上找的 然后 自己试了试 还是可以用的
- 如何注册OCX控件
- 怎样使控件注册到VS2005 工具箱中(一)
- OCX控件注册
- C#实现Dll(OCX)控件自动注册的两种方法
- MFC OCX 控件事件的添加和处理
- mfc笔记——控件ocx的添加
- OCX控件注册
- 控件注册 - 利用资源文件将dll、ocx打包进exe文件(C#版)
- ASP.NET自定义控件VS2012中添加失败(下列控件已成功添加到工具箱中,但未在活动设计器中启用)
- C++注册,卸载OCX控件,以及判断是否注册
- OCX控件的注册卸载,以及判断是否注册
- 怎样使控件注册到VS2005 工具箱中
- vc 从工具箱中移除控件 ocx
- 安装程序自动注册控件到工具箱 vs.net 2005