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; button1: tbutton; button2: tbutton; button3: tbutton; Procedure button1click (Sender: tobject); Procedure destroy (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} const imgpath1 = 'C: \ temp \ delphix.bmp '; Procedure tform1.button1click (Sender: tobject); begin dxdraw1.surface. fill (0); dxdraw1.surface. loadfromfile (imgpath1); dxdraw1.flip; end; Procedure tform1.button2click (Sender: tobject); begin dxdraw1.surface. fill (0); dxdraw1.surface. loadfromfile (imgpath1); dxdraw1.surface. lock; dxdraw1.surface. blur; dxdraw1.surface. unlock; dxdraw1.flip; end; Procedure prepare (Sender: tobject); begin with dxdraw1.surface do begin fill (0); loadfromfile (imgpath1); lock; blur; unlock; end; dxdraw1.flip; end.