Access windows form in exe from dll

  • Thread starter Thread starter Martin Carolan
  • Start date Start date
M

Martin Carolan

Hi there,

I'm having a bit of trouble figuring out how to do this, help would be appreachiated:

I have a windows form inside an exe called frmWizard, it is just a wizard
interface with some navigation controls and a header. The form loads wizard
steps via. the type Wizard.Interop.Step (wizard.Interop is a seperate assembly)
and Wizard.Interop.Step inherits System.Windows.Forms.UserContorl. I have
no problem loading the control which inherits Wizard.Interop.Step, but I
cannot access frmWizard from inside Wizard.Interop.Step. I tried adding wizard.exe
as a reference in Wizard.Interop but VS won't let me. Basically I just want
to hook into a few events from Wizard.Interop.Step that are raised in frmWizard.
Hope you understand what I mean

Can anybody help? Thanks, Martin
 
Hi,

What you can do is create a SEPARATED project and declare an interface with
the features of frmWizard that you need accesible from the dll , then use
this inteface in both projects , and make frmWizard implement it.

cheers,
 
Back
Top