|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
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 "S4" <rgrene@nospams4si.com> schrieb: What is an MDI (Multiple Document Interface?) session? Which variables do > How can I preserve variables for a MDI session? 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/> 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 -- Show quoteHide quoteRichard Grene ________________________________ This mailbox protected from junk email by MailFrontier Desktop from MailFrontier, Inc. http://info.mailfrontier.com "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/> 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 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 -- Show quoteHide quoteRichard 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 "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 > "S4" <rgrene@nospams4si.com> schrieb How did you managed to have multiple MDI parent forms in one single> 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. 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 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 -- Show quoteHide quoteRichard Grene S4 Solutions, Inc, ________________________________ This mailbox protected from junk email by MailFrontier Desktop from MailFrontier, Inc. http://info.mailfrontier.com "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 > "S4" <rgrene@nospams4si.com> schrieb Ok, did not even know this was possible.> 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 I still suggest to put them into the MDI parent.> 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. Armin
Option Strict
Declaring Variables Within a If Steatement Extending Business Object New kind of warning Open pdf file with button in VB 2005 vb.net strings passing Win32 Dlls - HELP Window Form's icon problem? Error Trapping for trying to run an exe file without supporting files Summary of my experience with combo box, any further suggestions ? Automatically unselecting text |
|||||||||||||||||||||||