Board index » delphi » HOW TO CHANGE SCREEN RESOLUTION ???

HOW TO CHANGE SCREEN RESOLUTION ???

HOW TO CHANGE SCREEN RESOLUTION ???
and how to determinate the screen resolution ???
Thanks

Vincent Millet
mailto:v.p...@hol.fr

 

Re:HOW TO CHANGE SCREEN RESOLUTION ???


to determine the screen resolution I think you should be able to use
Screen.width and Screen.Height

Alex

vpink <v.p...@hol.fr> wrote in article <33A4451C.3...@hol.fr>...

Quote
> HOW TO CHANGE SCREEN RESOLUTION ???
> and how to determinate the screen resolution ???
> Thanks

> Vincent Millet
> mailto:v.p...@hol.fr

Re:HOW TO CHANGE SCREEN RESOLUTION ???


Here's my quick help....

For the Borland TI's - this returns max colors for that resolution.  Try
help files for GetDeviceCaps().

Function TForm1.GetColorsCount:Integer;
Var
   h: hDC;
Begin
     h:=0;
   try
      Result := 0;
      h := GetDC(0);
      Result := 1 shl(GetDeviceCaps(h,PLANES) * GetDeviceCaps(h,
BITSPIXEL));
      finally
      ReleaseDC(0,h);
   end;
end;

 vpink wrote in article <33A4451C.3...@hol.fr>...

Quote
>HOW TO CHANGE SCREEN RESOLUTION ???
>and how to determinate the screen resolution ???
>Thanks

>Vincent Millet
>mailto:v.p...@hol.fr

Re:HOW TO CHANGE SCREEN RESOLUTION ???


Quote
vpink wrote:

> HOW TO CHANGE SCREEN RESOLUTION ???
> and how to determinate the screen resolution ???
> Thanks

> Vincent Millet
> mailto:v.p...@hol.fr

Well, to DETERMINE the resolution it's Screen.Height and Screen.Width
(Screen is a variable of type TScreen)...Sorry I don't know how to
change it...

Re:HOW TO CHANGE SCREEN RESOLUTION ???


Quote
vpink <v.p...@hol.fr> wrote:
>HOW TO CHANGE SCREEN RESOLUTION ???
>and how to determinate the screen resolution ???
>Thanks

>Vincent Millet
>mailto:v.p...@hol.fr

This changes the screen res to 1024x768@75Hz,
works on NT4/Win95(OSR2).

var dm : TDeviceMode;
ret : Longint;

with dm do
begin
dm.dmFields := DM_PELSWIDTH or DM_PELSHEIGHT or DM_DISPLAYFREQUENCY;
dm.dmPelsWidth:=1024;
dm.dmPelsHeight:=768;
dm.dmDisplayFrequency:=75;
end;
ret:=ChangeDisplaySettings(dm, 0);

Other Threads