Home All Groups Group Topic Archive Search About
Author
11 Jan 2006 11:18 PM
S4
How can I preserve variables for a MDI session?

Thanks

--
Richard________________________________

This mailbox protected from junk email by MailFrontier Desktop
from MailFrontier, Inc. http://info.mailfrontier.com

Author
11 Jan 2006 11:40 PM
Herfried K. Wagner [MVP]
"S4" <rgrene@nospams4si.com> schrieb:
> How can I preserve variables for a MDI session?


What is an MDI (Multiple Document Interface?) session?  Which variables do
you want to preserve for which purpose?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Jan 2006 12:12 AM
S4
I have a seach screen that calls a MDI Parent form that has several MDI
Child form options.  Since more than one seach can be clicked on and
therefore more than one MDI Parent form can be open at one time, I need tp
keep all variables within each MDI Parent/Child session distict.  What is
the best way to declare and keep track of each MDI session variables.

Thanks again,

Richard

--
Richard Grene


________________________________

This mailbox protected from junk email by MailFrontier Desktop
from MailFrontier, Inc. http://info.mailfrontier.com



Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:uwqkzhwFGHA.3532@TK2MSFTNGP14.phx.gbl...
> "S4" <rgrene@nospams4si.com> schrieb:
>> How can I preserve variables for a MDI session?
>
>
> What is an MDI (Multiple Document Interface?) session?  Which variables do
> you want to preserve for which purpose?
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
12 Jan 2006 10:52 AM
Cyril Gupta
Herfried,

This is what happens when people code for the web and then move to
applicatioins :) Session variables are a part of webpage programming as I
realized from Richard's second post

Richard,

The 'Session' variables go out of scope as soon as you close the instance of
that MDI form. While the form is instantiated you can access the 'Session'
variables this way provided the variable has been declared with Public Scope
(Use Public instead of Dim)

myForm.VariableName

Cheers
Cyril
Author
12 Jan 2006 2:13 PM
S4
If I declare the Public variable in a module, that variable would be
accessable from the MDI & Child forms.  If I have more than 1 MDI Parent
open at the same time then the variables would be shared and that is BAD. I
need the variables in each MDI Parent/Child sessions distinct from each
other.

Thanks

--
Richard Grene

S4 Solutions, Inc,
1757 Merrick Avenue
Suite 204
Merrick, NY 11566
516-379-8630
516-379-8633 (fax)

________________________________

This mailbox protected from junk email by MailFrontier Desktop
from MailFrontier, Inc. http://info.mailfrontier.com



Show quoteHide quote
"Cyril Gupta" <nom***@mail.com> wrote in message
news:uDhZfa2FGHA.2084@TK2MSFTNGP09.phx.gbl...
> Herfried,
>
> This is what happens when people code for the web and then move to
> applicatioins :) Session variables are a part of webpage programming as I
> realized from Richard's second post
>
> Richard,
>
> The 'Session' variables go out of scope as soon as you close the instance
> of that MDI form. While the form is instantiated you can access the
> 'Session' variables this way provided the variable has been declared with
> Public Scope (Use Public instead of Dim)
>
> myForm.VariableName
>
> Cheers
> Cyril
>
Author
12 Jan 2006 3:03 PM
Armin Zingler
"S4" <rgrene@nospams4si.com> schrieb
> If I declare the Public variable in a module, that variable would be
> accessable from the MDI & Child forms.  If I have more than 1 MDI
> Parent open at the same time then the variables would be shared and
> that is BAD. I need the variables in each MDI Parent/Child sessions
> distinct from each other.

How did you managed to have multiple MDI parent forms in one single
application?

You now see why Modules can be a bad thing. Declare the variables in the
MDI parent as they obviously belong to the MDI parent. Pass them to the
child Forms when necessary. Perhaps you will have to redesign something and
go the OOP way.


Armin
Author
12 Jan 2006 8:20 PM
S4
My app is a Client/Server Collections system is as follows:
1. The user logs in and gets a list of people to call.  When they select a
person, I have a MDI parent open and the MDI parent has various MDI children
options.

2. While the first MDI Parent is open, the user has the option to bring up
another person, thereby opening another MDI Parent/Child forms.

The issue is, whats the best way to maintain the inegrity of variables
within each MDI session.  Right now I use Public variables in a module and
that of course does not keep varaible distinct between MDI Parents.

Thanks
I

--
Richard Grene

S4 Solutions, Inc,

________________________________

This mailbox protected from junk email by MailFrontier Desktop
from MailFrontier, Inc. http://info.mailfrontier.com



Show quoteHide quote
"Armin Zingler" <az.nospam@freenet.de> wrote in message
news:uvVwSp4FGHA.740@TK2MSFTNGP12.phx.gbl...
> "S4" <rgrene@nospams4si.com> schrieb
>> If I declare the Public variable in a module, that variable would be
>> accessable from the MDI & Child forms.  If I have more than 1 MDI
>> Parent open at the same time then the variables would be shared and
>> that is BAD. I need the variables in each MDI Parent/Child sessions
>> distinct from each other.
>
> How did you managed to have multiple MDI parent forms in one single
> application?
>
> You now see why Modules can be a bad thing. Declare the variables in the
> MDI parent as they obviously belong to the MDI parent. Pass them to the
> child Forms when necessary. Perhaps you will have to redesign something
> and
> go the OOP way.
>
>
> Armin
>
Author
12 Jan 2006 8:49 PM
Armin Zingler
"S4" <rgrene@nospams4si.com> schrieb
> My app is a Client/Server Collections system is as follows:
> 1. The user logs in and gets a list of people to call.  When they
> select a person, I have a MDI parent open and the MDI parent has
> various MDI children options.
>
> 2. While the first MDI Parent is open, the user has the option to
> bring up another person, thereby opening another MDI Parent/Child
> forms.

Ok, did not even know this was possible.

> The issue is, whats the best way to maintain the inegrity of
> variables within each MDI session.  Right now I use Public variables
> in a module and that of course does not keep varaible distinct
> between MDI Parents.


I still suggest to put them into the MDI parent.


Armin