Re: Equivalent to VCL's DataModule



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: Equivalent to VCLs DataModule
    ... DataModule is a design-time visual container for non-GUI components, ... while for a Dll at run-time it is the programmer's responsibility ... like the ability to manipulate it 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)
  • ADO in DLL
    ... I have one export procedure that takes on pchar string ... When the procedure is finished the DLL get lots of DLL_THREAD_ATTACH ... Previously I did get "Coinitialze not called" when the datamodule is ... aStr: String; ...
    (borland.public.delphi.database.ado)

Loading