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.
--------------------
From: "Nathan" <nk*********************@softhome.net>
Subject: Accessing variables in referenced class library
Date: Sun, 1 Feb 2004 21:08:55 -0600
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O2**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 1Cust68.tnt4.ofallon.mo.da.uu.net 65.239.207.68
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP11.
phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.vb:178200
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
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
formchanges 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