PDA

View Full Version : گرفتن Color Depth کنونی Resolution



Delphi-Man
یک شنبه 15 آذر 1388, 16:05 عصر
سلام چگونه میتونم تعداد رنگهای رزولیشنی که الان فعال هست رو بگیرم؟

Felony
یک شنبه 15 آذر 1388, 16:27 عصر
من یه کد پیدا کردم برای ++C بود ، تبدیلش کردم به دلفی ، چیز خاصی نداره و رو سیستم خودم تست کردم درست جواب میده :


Function GetColorDepth:Integer;
var
bpp,planes:Integer;
hDC:THandle;
begin
hDC := GetDC(0);
bpp := GetDeviceCaps(hDC, BITSPIXEL);
planes := GetDeviceCaps(hDC, PLANES);
ReleaseDC(0, hDC);
Result:=bpp;
end;

لینک کد ++C (http://www.programmersheaven.com/mb/windows/134926/135052/re-to-get-current-color-depth/)