ActiveX document or something similar in C # /. NET

How can I implement an ActiveX document in C # /. NET? (ActiveX document can draw itself in IE)
Update: I need a solution to draw my own document type in IE windows (like MS Word or MS Excel, draw its documents in IE).

+1


source to share


4 answers


You need to dive into OLE for this purpose.



Things like IOleDocument, IOleInPlaceSite (see MSDN for this). Find out what interfaces are needed for the client (since IE will be a container and it will need to interact with interface implementations) and how data is exchanged, for example, what is called sometime. It's not rocket science, but I believe there is still a lot of work to do.

+1


source


Have a look at http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.domdocument.aspx , this is a .NET wrapper for DOM document



0


source


My first thought is that you can use a WPF page that can be hosted in a WPF window or in IE.

From MSDN:

Encapsulates a content page, which can be Windows Internet Explorer Navigation, NavigationWindow, and Frame.

0


source


It's possible, but it's difficult .. Poor lack of documentation ... Microsoft is not interested in supporting this scenario. The other tricky part is debugging the boundaries between HTML / DOM and the ActiveX control.

For what you are doing, it looks like Silverlight will be the better choice. It only supports a subset of .Net, but does support graphics. It will be much easier for you to find the documentation. And it will work on non-Windows computers.

But maybe you need something Silverlight doesn't do (like support for audio input). If so, there are various blogs on the topic of varying quality. Here are two that stood out as the most helpful to me:

http://www.codeproject.com/KB/cs/CreateActiveXDotNet.aspx

http://blog.ianchivers.com/wordpress/?p=22

I recommend using OleView to check the types of libraries you are producing and see what you expect. You can also do this to see how to break event properties into get / set functions, which I had to do to debug some scripts.

You should also understand the difference between a "debugger for processing" with scripted or guided debugging. At some point, you will join one when you think you are using the other.

0


source







All Articles