Use the image and fax browser provided by windows in Delphi

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.