how can form in class lib write/talk to EXE form?

R

Ron

Hello,

I need 2 projects/apps to communicate with each other. I
figured out how to create a Class Library project with a
form and how to add a new exe project to the solution. I
set the dependencies where the exe proj is dependent on
the class lib proj. Now I can instantiate the form in the
class lib (frmLIB) from the exe form (frmEXE). I can also
write text to frmLIB.txtLIB.text from frmEXE. But I
really need for frmLIB to be able to write text to
frmEXE.txtEXE.Text. For example, If I click a button on
frmLIB I want "testing" to show up in frmEXW.txtEXE.Text.

Here is how I instantiate frmLIB and write to txtLIB.text -
frmEXE is dependent on clsLIB and I have made a reference
to clsLIB.DLL

Dim frm As clsLIB.frmLIB = New clsLIB.frmLIB
frmLIB.txtLIB.Text = "testing"
frmLIB.Show()

So how can frmLIB reference frmEXE? I switched the
dependcies so that clsLIB is dependent on frmEXE, but I
can't reference frmEXE from frmLIB. Is this doable?

Thanks
 
R

Ron

I am pretty sure that frmLib in the Class library project
cannot write to frmEXE in the exe project.

How about this? If I have 2 separate EXE projects,
frmEXE1 and frmEXE2 (both have references to the Class
Libary Project frmLIB.dll) can they both write to the same
instance of frmLIB? Like frmEXE1 could instantiate
frmLIB, then I would like frmEXE2 to be able to write to
that same instance of frmLIB. This would be like using
GetObject(, "frmLIB"). Would this be doable? How to do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top