procedure TForm1.FormCreate(Sender: TObject);
var devmode : TDEVMODE;
d : INTEGER;
litem : TListItem;
p : ^TDevmode;
begin
devmode.dmSize := SizeOf(TDEVMODE);
devmode.dmDriverExtra := 0; d := 0;
listview1.Columns[0].Width := 400;
While EnumDisplaySettings(nil, d, devmode) do
with devmode do
begin
Inc(d);
litem := listview1.Items.Add;
litem.Caption:=Format('Modus %3d : %dx%d, %d Farben(%d Hz)', [d,dmPelsWidth,dmPelsHeight,1 shl(dmBitsPerPel),dmDisplayFrequency]);
new(p);
p^ := Devmode;
litem.Data := p;
end;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
ChangeDisplaySettings(TDevmode(listview1.Selected.data^),0);
end;

8 Responses so far.

Post a Comment

Thank you for your comment.

Any request and idea are welcome.

CLICK TO REGISTER