Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get current display refresh rate

Status
Not open for further replies.

nightburner

Programmer
Jan 5, 2003
2
0
0
GB
Hi All

I am after a way to get the current refresh rate,
before changing to a different resolution in delphi.
Then at end of program change back to original settings.
Any ideas?

Just at the moment for test purposes I can get the
current width,height and color depth with following
test program.

procedure TForm1.FormActivate(Sender: TObject);
var hdc: Longint;
desktophandle: HWND;
begin
edit1.text:=inttostr(screen.width);
edit2.text:=inttostr(screen.height);
desktophandle:=getdesktopwindow();
hdc:=getdevicecontext(desktophandle);
edit3.text:=inttostr(getdevicecaps(hdc,BITSPIXEL));
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top