473,508 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MDI's

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


Jan 11 '06 #1
7 1130
"S4" <rg****@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/>

Jan 11 '06 #2
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

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uw**************@TK2MSFTNGP14.phx.gbl...
"S4" <rg****@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/>

Jan 12 '06 #3
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
Jan 12 '06 #4
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

"Cyril Gupta" <no****@mail.com> wrote in message
news:uD**************@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

Jan 12 '06 #5
"S4" <rg****@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

Jan 12 '06 #6
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

"Armin Zingler" <az*******@freenet.de> wrote in message
news:uv*************@TK2MSFTNGP12.phx.gbl...
"S4" <rg****@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

Jan 12 '06 #7
"S4" <rg****@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
Jan 12 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3061
by: Sylvain | last post by:
Hi, I am developping a Visual C++ application. In my application, I created a Mdi parent form with a main menu. I also created a "menuItem" click to display a Mdi child form. I want in this case...
10
3984
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
0
4461
by: Henry Wu | last post by:
Hi, I am aware that TransparencyKey only works with top-level forms or Non-MDI Child Forms, if one tries to set the opacity or transparencykey property to a MDI-Child form, it will have no effect....
0
1845
by: Bruin | last post by:
Hi All, I'm having a problem with MDI child forms when the reference to the MDI Parent is set in a Control library. (Sorry for the long post) I have an control library assembly which holds all...
6
1277
by: Bernie Yaeger | last post by:
A form may not be both a child window and an mdi parent, but why not? I can think of many instances where such would be valuable. Indeed, the basic structure of menus and submenus is the perfect...
4
2758
by: LCAdeveloper | last post by:
Help! Another newbie question I'm afraid. I have a toolbar on an MDI form, which I can control OK to produce a child form. When the child form is active, the appropriate MDI parent form toolbar...
4
7408
by: Martin | last post by:
Hi all! As a preparation of a conversion from VB6 to VB2005 I'm playing around with VB2005. One of the first things that strike me is the user-interface. In all documentation Microsoft keeps...
0
2277
by: Scott H. | last post by:
I have an MDI parent form that creates mdi child forms each of which are represented by a tab item. I use a third party control to generate the tabbed MDI child forms. Each tab or MDI child form...
13
2915
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the...
0
7233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.