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

Displaying an instantiated control

P: n/a
Hi,

I don't want to be a pain by reposting, but this has been bothering me for
months. Sorry if I am being a nuisance.

I have a set of classes, each associated with a row of a DB. I want to
embed within each class a form to display the row and associated subordinate
rows. Also, I want to use VS to maintain the forms.

The classes will be instanitated as required for possible data
manipulation/retrieval, but not displayed unless explicitly directed.

I thought I could develop each class as a Windows Control library. Then I
could instantiate the appropriate class as needed, manipulate it and then
display it if necessary.

Here's my problem.

I do not know how to display the control without adding it to the Controls
container. I could instantiate each and every class (hidden) at BOJ and
Show them when needed, but I don't like this approach since there is only a
subset of classes required for any one execution.

I really would like to keep everything contained, including the display
capability, within each class. Is there a better way to do this? Is it
possible for me to implement my idea?

Thanx,
Bill


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


P: n/a
Have you tried inheriting your classes from System.Windows.Forms.Form?

DalePres
MCAD, MCDBA, MCSE
"web1110" <we***@comcast.net> wrote in message
news:oK********************@comcast.com...
Hi,

I don't want to be a pain by reposting, but this has been bothering me for
months. Sorry if I am being a nuisance.

I have a set of classes, each associated with a row of a DB. I want to
embed within each class a form to display the row and associated
subordinate
rows. Also, I want to use VS to maintain the forms.

The classes will be instanitated as required for possible data
manipulation/retrieval, but not displayed unless explicitly directed.

I thought I could develop each class as a Windows Control library. Then I
could instantiate the appropriate class as needed, manipulate it and then
display it if necessary.

Here's my problem.

I do not know how to display the control without adding it to the Controls
container. I could instantiate each and every class (hidden) at BOJ and
Show them when needed, but I don't like this approach since there is only
a
subset of classes required for any one execution.

I really would like to keep everything contained, including the display
capability, within each class. Is there a better way to do this? Is it
possible for me to implement my idea?

Thanx,
Bill

Nov 16 '05 #2

P: n/a

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:ez*************@TK2MSFTNGP15.phx.gbl...
Have you tried inheriting your classes from System.Windows.Forms.Form?

DalePres
MCAD, MCDBA, MCSE
"web1110" <we***@comcast.net> wrote in message
news:oK********************@comcast.com...
Hi,

I don't want to be a pain by reposting, but this has been bothering me for months. Sorry if I am being a nuisance.

I have a set of classes, each associated with a row of a DB. I want to
embed within each class a form to display the row and associated
subordinate
rows. Also, I want to use VS to maintain the forms.

The classes will be instanitated as required for possible data
manipulation/retrieval, but not displayed unless explicitly directed.

I thought I could develop each class as a Windows Control library. Then I could instantiate the appropriate class as needed, manipulate it and then display it if necessary.

Here's my problem.

I do not know how to display the control without adding it to the Controls container. I could instantiate each and every class (hidden) at BOJ and
Show them when needed, but I don't like this approach since there is only a
subset of classes required for any one execution.

I really would like to keep everything contained, including the display
capability, within each class. Is there a better way to do this? Is it
possible for me to implement my idea?

Thanx,
Bill


Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.