Re: Equivalent to VCL's DataModule



Why is it misleading?

It is a class that inherits Component. Nothing more, nothing less.


"Edward Diener" <eddielee_no_spam_here@xxxxxxxxxxxxxx> wrote in message
news:uGzWEm2TGHA.2156@xxxxxxxxxxxxxxxxxxxxxxx
Clive Dixon wrote:
Sounds like you could be thinking of a "component class". In VS 2003 if I
right click on my project, select Add -> Add Component and select
Component Class. VS then gives you a C#/VB/C++ class with a "designer
page" onto which you can drag drop components and set their properties in
the same way as for UI controls on a form. Is this the kind of thing
you're looking for?

Bravo ! Yes. I knew MS had to be smart enough to include something like
this in .NET. I guess I should have found it previously, but thanks for
bringing it to my attention and seeing this is what I was asking for.

The name is a bit misleading to me. I would have preferred it to be called
a component container or even a data container since I am guessing I can
add non-component value data manually to it also.


"Edward Diener" <eddielee_no_spam_here@xxxxxxxxxxxxxx> wrote in message
news:OCiOYO0TGHA.2244@xxxxxxxxxxxxxxxxxxxxxxx
In Borland's VCL ( Visual Component Library ), one can use a DataModule
into which one can drop non-visual components from the RAD designer. The
DataModule is a design-time visual container for non-GUI components,
which is never seen visually at run-time as a GUI control. An
application or Dll can have any number of datamodules in it, each with
its own name. One can also manually add any non-GUI data to any
particular DataModule. For an application at run-time, datamodule
instances for each visual datamodule are automatically created just like
forms, while for a Dll at run-time it is the programmer's responsibility
to create datamodule instances for each visual datamodule created at
design time.

I have found the ability to use datamodules as visual containers to
non-GUI components in an application or Dll to be very useful.
Admittedly a datamodule is nothing more than a class which contains
instances of non-GUI components and possibly other non-GUI fields, but I
like the ability to manipulate it at design time, and as a means of
separating the data portion of an application or Dll from the GUI
portion.

Does .NET have any equivalent to this idea, so that non-visual
components can be created at design time without having to drop such a
component on a Windows or Web form. ?


.



Relevant Pages

  • Re: Equivalent to VCLs DataModule
    ... Unlike VCL's DataModule all of the contained components are declared private in the class, which means that they are not accessible outside of the class. ... I would have preferred it to be called a component container or even a data container since I am guessing I can add non-component value data manually to it also. ... The DataModule is a design-time visual container for non-GUI components, which is never seen visually at run-time as a GUI control. ... For an application at run-time, datamodule instances for each visual datamodule are automatically created just like forms, while for a Dll at run-time it is the programmer's responsibility to create datamodule instances for each visual datamodule created at design time. ...
    (microsoft.public.dotnet.framework)
  • Re: Oh... The non-visual components are in my form....as before...
    ... >> instance needs to have its own set of instances of the ... > Create a separate instance of the datamodule for each form. ... A little coding only is required and you can still use design time stuff ...
    (borland.public.delphi.non-technical)
  • Re: Equivalent to VCLs DataModule
    ... The DataModule is a design-time visual container for non-GUI components, which is never seen visually at run-time as a GUI control. ... For an application at run-time, datamodule instances for each visual datamodule are automatically created just like forms, while for a Dll at run-time it is the programmer's responsibility to create datamodule instances for each visual datamodule created at design time. ...
    (microsoft.public.dotnet.framework)
  • Re: Equivalent to VCLs DataModule
    ... An application or Dll ... also manually add any non-GUI data to any particular DataModule. ... visual datamodule created at design time. ... non-GUI components in an application or Dll to be very useful. ...
    (microsoft.public.dotnet.framework)
  • Equivalent to VCLs DataModule
    ... In Borland's VCL, one can use a DataModule into which one can drop non-visual components from the RAD designer. ... The DataModule is a design-time visual container for non-GUI components, which is never seen visually at run-time as a GUI control. ... For an application at run-time, datamodule instances for each visual datamodule are automatically created just like forms, while for a Dll at run-time it is the programmer's responsibility to create datamodule instances for each visual datamodule created at design time. ...
    (microsoft.public.dotnet.framework)