How do I obtain the screen resolution and color depth?

The following example returns a record with resolution and colordepth info. Look in online help for additional information that you can get from the GetSystemMetrics and GetDeviceCaps functions.

type
  TVideoInfo = record
    HorzRes: Integer;
    VertRes: Integer;
    BitsPerPixel: Integer;
  end;

function GetVideoInfo: TVideoInfo;
begin
  with Result do
  begin
    HorzRes:=GetSystemMetrics(SM_CXSCREEN);
    VertRes:=GetSystemMetrics(SM_CYSCREEN);
    BitsPerPixel:=GetDeviceCaps(GetDC(GetDesktopWindow),BITSPIXEL);
  end;
end;

Source: www.guidogybels.net.