PC Review


Reply
Thread Tools Rate Thread

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

 
 
Ron
Guest
Posts: n/a
 
      21st Oct 2004
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
 
Reply With Quote
 
 
 
 
Ron
Guest
Posts: n/a
 
      21st Oct 2004
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?


>-----Original Message-----
>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
>.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: class library write back to form mickieparis Microsoft C# .NET 16 21st Dec 2009 10:26 PM
putting custom control on a form that inherits from my form class, doesn't work Capital O Microsoft Dot NET Compact Framework 2 4th Jan 2006 05:36 PM
How do I write to a textbox in a form from within a class =?Utf-8?B?aGFtaWw=?= Microsoft VB .NET 19 8th Oct 2004 09:11 AM
write to a Form label from a class object? Steve Microsoft VB .NET 2 13th Sep 2004 07:23 PM
How do I get a COM Addin and VB .NET form to talk to each other? emmett Microsoft VB .NET 0 16th Dec 2003 11:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:20 PM.