Host Do I Host OCXs In Viewer Created By SCSF?

Topics: CAB & Smart Client Software Factory
Mar 16, 2007 at 12:35 AM
I created a composite application using SCSF. I added a new business module and tried to add a COM OCX control onto the viewer. When I run the application, I immediately get an error. If I remove the OCXs and only use .NET controls, I can display the viewer.

Has anybody experienced this problem? How do I host 3rd party OCXs in the viewer?

Any solution would be greatly appreciated!
Coordinator
Mar 17, 2007 at 12:55 PM

agedwards wrote:
When I run the application, I immediately get an error. If I remove the OCXs and only use .NET controls, I can display the viewer.



What is the error that you are getting? SCSF views are plain usercontrols. You should be able to do the same thing that you do in regular winforms applications. Can you show us the code that you are using to show the OCX?

Thanks
Matias
http://staff.southworks.net/blogs/matiaswoloski
Coordinator
Mar 19, 2007 at 8:45 PM
Hi

Try not adding the OCX to the workitem, you don't need it. Do something like this:

MarketData view = new MarketData();
WorkItem.Workspaces[WorkspaceNames.Zone1Workspace].Show(view);

Let me know if it works

Thanks
Matias
http://staff.southworks.net/blogs/matiaswoloski