1. I use SharpDevelop and i really need to use a WebBrowser component,i studied In Wikipedia how to do import ActiveX,but there is a little problem,if you want to import ActiveX you have to have SDK framework, i have 1.0 and 1.1 but they arent SDK,i have SDK 2,0 beta so question is can i use aximp.exe from 2.0 to create ActiveX wraper and then use it to create application in 1.1?? framework?http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.ActiveXImport <--this is link if answer to first question is positive can someone explain to me 2.step in that tutorial??Please!?!

Dani AI

Generated

Short answer for (and yes, as suggested it looks confusing): you cannot reliably take the binary Interop/AxInterop DLLs produced by the .NET 2.0 AxImp/TlbImp tools and drop them into a .NET 1.1 build — interop assemblies are produced for the CLR that the tool targets. You have two practical choices: run the 1.1 SDK/tools (recommended), or use AxImp's /source switch to emit C# wrapper source and then compile that source with the v1.1 compiler so the final assemblies target CLR 1.1. (learn.microsoft.com)

A simple workflow that usually works if you only have AxImp 2.0 available:

  1. generate C# wrapper source with AxImp,
  2. compile the generated .cs files with the v1.1 C# compiler, and
  3. add the resulting assemblies to your SharpDevelop project as references. The generator step looks like this:
aximp /source "C:\Windows\System32\YourActiveX.ocx"

Then compile the generated code with the v1.1 compiler (example):

C:\Windows\Microsoft.NET\Framework\v1.1.4322\csc.exe /target:library /out:AxInterop.YourActiveX.dll AxInterop.YourActiveX.cs

Add the produced DLL(s) to your project references and use the AxHost-derived control. (learn.microsoft.com)

Important cautions and tips: Microsoft explicitly warns that using AxImp on the built‑in Internet Explorer host (shdocvw.dll / the WebBrowser ActiveX) is unsupported and can cause system problems (AxImp may generate a shdocvw.dll in the current folder that Windows can pick up instead of the system one). If your goal is an embedded browser, the cleaner options are to target .NET 2.0 (it ships System.Windows.Forms.WebBrowser), or install the 1.1 SDK and generate the interops there. Also make sure the ActiveX is registered (regsvr32) before you run the tools; if you use /source you may want to tweak the generated class (add ToolboxItem/DesignTimeVisible attributes) and sign the assembly if needed. (learn.microsoft.com)

Summary: either get the 1.1 SDK/tools (best), or use aximp /source + compile with the v1.1 compiler so your wrapper assembly is actually built for CLR 1.1. (learn.microsoft.com)

Wow how complicated I dunno what you're talking about...

Its simple,is there other way to use COM objects trough SharpDevelop.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.