Delphi dynamically Change screen resolution

Source: Internet
Author: User
Http://www.cnblogs.com/key-ok/p/4594674.html How to dynamically change the screen resolution there are many gadgets that can dynamically change the screen resolution without restarting Windows. Do you want to do it yourself? Please add the following function Resolution (X,y:word) to the interface segment: Boolean, and then write the following code in the implementation segment: function Resolution (X,y:word)  : Boolean; var Devmode:tdevicemode;  Begin Result:=enumdisplaysettings (Nil,0,devmode);  If Result then begin Devmode.dmfields:=dm_pelswidth Or dm_pelsheight;  Devmode.dmpelswidth:=x;  Devmode.dmpelsheight:=y;  Result:=changedisplaysettings (devmode,0) =disp_change_successful;  End  End Next, put a button,caption in the form "800x600" and then write down the If Resolution (800,600) then ShowMessage (' 800x600 mode! ') in its OnClick event ; All right, try it!

Delphi dynamically change screen resolution (RPM)

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.