Problem with Injecting Reference to TShell

Topics: CAB & Smart Client Software Factory
Apr 14, 2006 at 2:45 AM
originally posted by: imakowski

During startup of my application I entered MyCustomWorkItem and MyForm like that:

public class MyApplication: FormShellApplication<MyCustomWorkItem, MyForm>

I've overrided OnRunStarted() and create in it new MyWorkItem2. I wanted to inject MyForm into MyWorkItem2 constructor:

public MyWorkItem2(Dependency IWin32Window owner)
this._owner = owner;

but exception occured :/

I've wanted to use following code:
public MyWorkItem2(ComponentDependency("") IWin32Window owner)
this._owner = owner;

but I don't know ID of MyForm because it is created as GUID. Is there any way to setup ID for MyForm on application start?

Irek Makowski
Apr 18, 2006 at 2:54 AM
originally posted by: DLorenz

Yes, you can change the ID to anything you want (it is a string value) after the WorkItem is created.