CAB and UserControls

Topics: CAB & Smart Client Software Factory
Jan 26, 2006 at 10:58 AM
originally posted by: SteveGostling

We have a customer need for all the functionality within one of our CAB modules to be hosted as a UserControl within internet explorer.

What is the best way to do this and can it be done without losing all the framework functionality of the CAB

Is there anyway to have the main CAB application shell derive from UserControl instead of form and then the whole CAB application could be hosted within IE as a UserControl.

Feb 15, 2006 at 4:36 PM
originally posted by: eugeniop

You should be able to do this. We haven't tested this particular scenario, but we know of people hosting CAB in other enviroments (like Outlook for example).
Mar 8, 2006 at 9:35 AM
originally posted by: JeremyPeck

So did you ever get it working? I'm investigating the same thing and have had some success but haven't gotten it completely working.

Mar 8, 2006 at 11:27 AM
originally posted by: JaredBienz

I haven't done this exactly, but last weekend I completed my first Windows Presentation Foundation application that uses the CAB and I think the steps would be similar.

Essentially, you must make your own class that derives from CabShellApplication. Look to WindowsFormsApplication and FormShellApplication as a gude on how to do this. TShell would be of type Control (instead of Form), which would be the UserControl that's going to be your host. The 'Start' method won't really do anything but it's abstract in the base class so you'll still have to override it and leave it empty.

Be careful that none of your modules or views are expecting a form anywhere in the hierarcy. For example, Control.TopLevelControl might not be a form as you would normally expect.

Let us know how this works out for you,

Mar 8, 2006 at 11:50 AM
originally posted by: matiaswoloski

Hi guys,

I've implemented this UserControlShellApplication. You can read and download it from here:

Here is an indepth explanation of what is happening in the background