// Declaration: loadicon (hinstance: hinst; {EXE or DLL handle, 0 indicates loading system resources} lpiconname: pchar {Resource Identifier}): hicon; {return icon handle}
Here is an example
// Example of calling the System icon: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; Procedure button1click (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} procedure tform1.button1click (Sender: tobject); var ICO: ticon; I, X: integer; begin ICO: = ticon. create; X: = 10; for I: = 32512 to 32517 do begin ICO. handle: = loadicon (0, makeintresource (I); canvas. draw (x, 10, ico); Inc (x, ico. width + 10); end; ICO. free; end.
//:
// list of system icons attached: idi_application = makeintresource (32512); idi_hand = makeintresource (32513); idi_question = makeintresource (32514 ); outputs = makeintresource (32515); outputs = makeintresource (32516); idi_winlogo = makeintresource (32517); idi_warning = idi_exclamation; idi_error = idi_hand; idi_information = outputs;