|
Тема |
Re: Проблем с компонент [re: Mъpи] |
|
Автор |
Hateras (чакащ) |
|
Публикувано | 17.12.02 14:50 |
|
|
ако е само за Width, Height, Color Depth и V Refresh на текущия монитор:
procedure TForm1.Button1Click(Sender: TObject);
var ScreenHDC : HDC;
sWidth, sHeight : Integer;
sColors : Integer;
sVRefresh : Integer;
begin
ScreenHDC := CreateDC('DISPLAY', nil, nil, nil);
sWidth := GetDeviceCaps(ScreenHDC, HORZRES);
sHeight := GetDeviceCaps(ScreenHDC, VERTRES);
sColors := GetDeviceCaps(ScreenHDC,BITSPIXEL);
sVRefresh := GetDeviceCaps(ScreenHDC,VREFRESH);
edit1.Text := Format('%d * %d pixels',[sWidth,sHeight]);
edit2.Text := Format('%d bits per pixel',[sColors]);
edit3.Text := Format('%d Hz',[sVRefresh]);
end;
това работи на NT/2000, предполагам че и на XP ще стане, но за 95/98 май няма да работи...
ако ти трябва H Refresh - търси нещо друго :-(
--------------------------------------
Започва Път от моят праг...
|
| |
|
|
|