By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

Multi-forms accessing problem

P: n/a
Hi there,
I have a application with multi-forms.
The situation is that Form A(have a Dataset) is a base window,click one
button to instiniate Form B(use the Database from Form A, Update the Dataset
after something changed), How can I access to the dataset in Form A,
supposed Form A is also a child form of another form. like:

(Other Form (Form A{Dataset}(Form B)))

Basically, How can I use Form A from other form?

thanks

pei
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you truly want to define a parent-child relationship between the forms,
you could pass the parent form into the child form's constructor. Or you
could just pass whatever information you want to the forms constructor, like
the DataSet.

"pei_world" <pe*******@hotmail.com> wrote in message
news:e#**************@tk2msftngp13.phx.gbl...
Hi there,
I have a application with multi-forms.
The situation is that Form A(have a Dataset) is a base window,click one
button to instiniate Form B(use the Database from Form A, Update the Dataset after something changed), How can I access to the dataset in Form A,
supposed Form A is also a child form of another form. like:

(Other Form (Form A{Dataset}(Form B)))

Basically, How can I use Form A from other form?

thanks

pei

Nov 15 '05 #2

P: n/a
>"pei_world" <pe*******@hotmail.com> wrote in message
news:e#**************@tk2msftngp13.phx.gbl...
Hi there,
I have a application with multi-forms.
The situation is that Form A(have a Dataset) is a base window,click one
button to instiniate Form B(use the Database from Form A, Update the

Dataset
after something changed), How can I access to the dataset in Form A,
supposed Form A is also a child form of another form. like:

(Other Form (Form A{Dataset}(Form B)))

Basically, How can I use Form A from other form?

thanks

pei


In each form you can maintain a list of references to other forms,
right? And then when data changes, send a message to all of the other
forms.

You might also want to check out the Observer design pattern which
will prevent the need for any kind of polling.

HTH
Ben
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.