Mirror

videocard detection (Views: 709)


Problem/Question/Abstract:

This code shows how to detect your videocard (tested on win98 & win2k)

Answer:

First form has a button create another form with a memo

procedure TForm1.button1click(Sender: TObject);
var
  lpDisplayDevice: TDisplayDevice;
  dwFlags: DWORD;
  cc: DWORD;
begin
  form2.memo1.Clear;
  lpDisplayDevice.cb := sizeof(lpDisplayDevice);
  dwFlags := 0;
  cc := 0;
  while EnumDisplayDevices(nil, cc, lpDisplayDevice, dwFlags) do
  begin
    Inc(cc);
    form2.memo1.lines.add(lpDisplayDevice.DeviceString);
      {there is also additional information in lpDisplayDevice}
    form2.show;
  end;
end;

<< Back to main page