Display resolution Problems

Source: Internet
Author: User
Display resolution problems Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061207231528105.html
How can I list the resolutions and update rates supported by the current display?

// Sofa first

Procedure tform1.formcreate (Sender: tobject );
VaR
I: integer;
Devmode: tdevmode;
Begin
I: = 0;
While enumdisplaysettings (nil, I, devmode) Do begin
With devmode do
Listbox1.items. Add
(Format ('% DX % d colors ',
[Dmpelswidth, dmpelsheight, 1 SHL dmbitsperpel]);
INC (I );
End;
End;

// The update rate is dmdisplayfrequency.
Procedure tform1.formcreate (Sender: tobject );
VaR
I: integer;
Vdevmode: tdevmode;
Begin
I: = 0;
While enumdisplaysettings (nil, I, vdevmode) Do
Begin
Listbox1.items. Add (format ('% DX % d colors % d Hz ',[
Vdevmode. dmpelswidth, // width
Vdevmode. dmpelsheight, // high
1 SHL vdevmode. dmbitsperpel, // color
Vdevmode. dmdisplayfrequency // update rate
]);
INC (I );
End;
End;

All the answers come out.


^ _ ^. It looks like it is too late.

Thank you.

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.