Executing the example requires the Icons_1.bmp file that contains a set of icons.
Sub Main;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Doc: IDocument;
Begin
MB := MetabaseClass.Active;
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_DOCUMENT;
CrInfo.Id := "NewDocument";
CrInfo.Name := "Document with pictograms";
CrInfo.Parent := MB.Root;
Doc := MB.CreateObject(CrInfo).Edit As IDocument;
Doc.LoadFromFile("c:\Icons_1.bmp");
(Doc As IMetabaseObject).Save;
End Sub Main;
After executing the example the New Document object is created in the root folder. This document will contain the Icons_1.bmp graphic file. It can be used further for connection in the GlobalImageList component.
See also: