Displaying an instantiated control

  • Thread starter Thread starter web1110
  • Start date Start date
W

web1110

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
 
Have you tried inheriting your classes from System.Windows.Forms.Form?

DalePres
MCAD, MCDBA, MCSE
 
Back
Top