Hardware Delphi

Title: Detecting video hardware
Question: How to detect the active video card
Answer:
Have you ever wondered what display devices are available to your application? Here are some good starting points. But you should remember to further investigate this avenue, as it's more to using the display settings than detecting them.

procedure TForm1.ButtonClick(Sender: TObject);
var
lpDisplayDevice: TDisplayDevice;
dwFlags: DWORD;
cc: DWORD;
begin
lpDisplayDevice.cb := sizeof(lpDisplayDevice);
dwFlags := 0;
cc:= 0;
while EnumDisplayDevices(nil, cc, lpDisplayDevice , dwFlags) do
begin
Inc(cc);
aListbox.Items.Add(lpDisplayDevice.DeviceString); {there is also additional information in lpDisplayDevice}
end;
end;

Another way to detect video card settings is to read them from the registry, under the following registry key(s) :

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Display

However, if you previously had other videocards installed, you will still
have keys for the older videocards as well
%HKLM%\System\CurrentControlSet\Services\Class\Display\0000
%HKLM%\System\CurrentControlSet\Services\Class\Display\0001
%HKLM%\System\CurrentControlSet\Services\Class\Display\0002
.....
Bogdan Grigorescu - BogdanG@gmail.com
BG Remote Programming Group