Women in Technology

Hear us Roar

  Hosting Windows Forms Controls in COM Control Containers
Subject:   For more information...
Date:   2003-06-23 05:30:17
From:   anonymous2
If you are really interested in doing this, there's not quite enough information in this article to pull it off. I would recommend reading the following link from Codeproject.com: http://www.codeproject.com/cs/miscctrl/exposingdotnetcontrols.asp

If you use the techniques outlined in the CodeProject article with Chris Sell's ComRegisterFunction/ComUnregisterFunction code you should be off and running!

Some important things to remember are:

1) Use the ComRegister/Unregister stuff!
2) Make sure to generate your assembly with a strong name and add it to the global assembly cache (gacutil /i)
3) I find I need to add the [ClassInterface(ClassInterfaceType.AutoDual)] attribute to my control for it to work.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • For more information...
    2003-07-29 12:18:33  anonymous2 [View]

    I got this approach to work, even loading the control in Excel. The problem is, it won't resize the way we expect ole objects to in office. I'm sure it requires some interface implementation or something only an ATL person would know, but I can't seem to find any info on it. Anyone have any ideas?