Delphi Tips&Tricks News   Tips   .NET Software   VCL Software   Search   Contacts
Ultimate Pack Special Offer!


Share this page

Follow us
LinkedIn Blogspot Twitter Facebook

Related products
Ultimate Pack  hot!
iGrid Plotter  new!
Image Editor
Runtime Fusion
Form Designer
Object Inspector
Print Suite Pro
Commented Image
Delphi Toys
WinDowse
Delphi Bonus
TMS Scripter Studio
Form Designer VB
Form Designer .NET
Print Suite .NET
Gradient Controls .NET  new!

Related links
Win32.hlp online version
MegaDetailed.NET
Delphi to C#

Special
Free Software Promotion
Offers for Resellers

Hobby projects
cdtrrracks.com
books.storrre.com
in3steps.com
sovietphillumeny.com

Get all video modes - System info - Tips & Tricks - Greatis Delphi Pages

Use EnumDisplaySettings function with TDeviceModeA structure for this problem.
EnumDisplaySettings function gives one video mode only. So you must call this function several times.
Also you must check result of this function with other results for getting exact information.


procedure TForm1.Button1Click(Sender: TObject);
var
  ModeNumber, j: Integer;
  MyMode: TDeviceModeA;
  Check, Need: Boolean;
  Str: string;
begin
  ModeNumber:=0;
  Check:=True;
  while(Check) do
  begin
    Check:=EnumDisplaySettings(nil, ModeNumber, MyMode);
    Str:=IntToStr(MyMode.dmPelsWidth)+'-'+IntToStr(MyMode.dmPelsHeight);
    Need:=False;
    for j:=0 to Memo1.Lines.Count-1 do
      if Memo1.Lines[j]=Str then
        Need:=True;
    if Need=False then Memo1.Lines.Add(Str);
    Inc(ModeNumber);
  end;
end;
Related topics
Set resolution of screen

For more
Win32 programmer's reference

Download source