In Delphi, you can call the Windows built-in image and fax browser to view the image. You can also call the drawing program to edit the image. You can use the built-in code that you cannot write.
Unit unit1; </P> <p> interface </P> <p> uses <br/> Windows, messages, sysutils, variants, classes, graphics, controls, forms, <br/> dialogs, stdctrls, shellapi; </P> <p> type <br/> tform1 = Class (tform) <br/> button1: tbutton; <br/> edit1: tedit; <br/> procedure button1click (Sender: tobject ); <br/> private <br/> {private Declarations} <br/> Public <br/> {public declarations} <br/> end; </P> <p> var <br/> form1: tform1; </P> <p> Implementation </P> <p> {$ R *. DFM} </P> <p> procedure tform1.button1click (Sender: tobject); <br/> var <br/> Sysdir, strparm, strpicpath, strrundll: array [0 .. 128] of char; <br/> P1, P2: pchar; <br/> begin </P> <p> getsystemdirectory (Sysdir, 128); <br/> strrundll: = Sysdir; <br/> strcat (strrundll, '/rundll32.exe'); <br/> // showmessage ('get rundll32 path normal '); <br/> strparm: = Sysdir; <br/> strcat (strparm, '/shimgvw. DLL imageview_fullscreen '); <br/> strpicpath: = 'd:/my document/my pictures/unnamed .bmp'; <br/> strcat (strparm, strpicpath ); </P> <p> // showmessage ('get strparm normal '); <br/> ShellExecute (form1.handle, nil, pchar (@ strrundll), pchar (@ strparm ), nil, sw_showmaximized); <br/> edit1.text: = strparm; <br/> end; </P> <p> end.