Accessing variables in referenced class library

  • Thread starter Thread starter Nathan
  • Start date Start date
N

Nathan

Hi,

I have created a class library creating a number of forms and a few public
variables. I have a project that references the .dll for this class
library, and in that project I need to access those public variables.

For instance, the main app calls a form in the referenced library, that form
changes the value of PublicVar1 and then closes. The main app now needs to
know the value of PublicVar1.

How can I do this?

Thanks,
Nathan
 
One way to do it is with show dialog -

Dim frm As New QueryPicker(qoOS, Tables.OSTable.IDFIELD)
If frm.ShowDialog = DialogResult.OK Then
intID = frm.SelectedID
frm.Dispose()
<< do stuff >>
Else
frm.Dispose()
End If

This makes a modal dialog however. If you don't want it to be modal, then
you can have the form raise an event that the main app can catch and handle
appropriately when the user hits OK.

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 
Back
Top