System.Classes.ReadComponentRes
Delphi
function ReadComponentRes(const ResName: string; Instance: TComponent): TComponent;
C++
extern DELPHI_PACKAGE TComponent* __fastcall ReadComponentRes(const System::UnicodeString ResName, TComponent* Instance);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | System.Classes |
Description
Reads components and their properties from a specified resource.
Call ReadComponentRes to create a component from its representation in a resource header. The ResName parameter is the name assigned to the resource for the component. The Instance parameter is an instance of the component that should be filled in with the attributes of the saved resource. Instance must be an object of the same class as the saved resource, or one of its descendants. Create an instance of the appropriate type of object, and then call ReadComponentRes to read in its property settings. If Instance is nil (Delphi) or NULL (C++), the object class is read from the resource.
ReadComponentRes returns an instance of the component that was read from the resource.