[quote="zieglersoft@zieglersoft.dkZieglerSoft" ]
procedure GetVideoModes(ModeList: TStringList);
{ proc to retrieve a list of acceptable video modes of the current video card. }
{ **********************************************
Usage:
procedure TForm1.FormCreate(Sender: TObject);
var
StrList: TStringList;
begin
StrList := TStringList.Create;
try
GetVideoModes(StrList);
Memo1.Lines := StrList;
finally
StrList.Clear;
StrList.Free;
end;
end;
{************************************************ }
var
i, j: integer;
MoreModes,
AddMode: boolean;
dm: TDeviceMode;
Mode: string;
begin
ModeList.Clear;
MoreModes := True;
Mode := '';
i := 0;
while MoreModes do
begin
MoreModes := EnumDisplaySettings(nil, i, dm);
Mode := IntToStr(dm.dmBitsPerPel) + ' Bits Per Pixel ' +
IntToStr(dm.dmPelsWidth) + ' x ' +
IntToStr(dm.dmPelsHeight);
AddMode := True;
{ Check to make sure this mode is not already in the list. }
for j := 0 to ModeList.Count-1 do
if Mode = ModeList[j] then
AddMode := False;
if AddMode then
ModeList.Add(Mode);
Inc(i);
end;
end;
[/quote]
Android smartphone
2010-06-15
Subscribe to:
Post Comments (Atom)
1 comment:
hey check this new website www.countcode.com. It's a social network made for programmers, where you can download,share or upload source codes, where you can count your own code lines for free. You have access to the web forum and the web chatroom. we are happy to have you joined to our community!
Post a Comment