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.