In this example:
Code File:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, dxdraws, stdctrls; Type tform1 = Class (tform) dxdraw1: tdxdraw; Metadata: tdximagelist; button1: tbutton; Procedure formcreate (Sender: tobject); Procedure button1click (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} procedure upload (Sender: tobject); const imgpath1 = 'C: \ temp \ delphix.bmp '; imgpath2 = 'C: \ temp \ delphix.jpg'; var picitem: tpicturecollectionitem; begin dximagelist1.dxdraw: = dxdraw1; dximagelist1.items. add; picitem: = dximagelist1.items [dximagelist1.items. count-1]; picitem. picture. loadfromfile (imgpath1); dximagelist1.items. add; picitem: = dximagelist1.items [dximagelist1.items. count-1]; picitem. picture. loadfromfile (imgpath2); end; Procedure tform1.button1click (Sender: tobject); begin with dximagelist1 do begin items [0]. draw (dxdraw. surface, 0, 0, 0); items [1]. draw (dxdraw. surface, 0, items [0]. height, 0); dxdraw. flip; end.