Board index » delphi » Resizing the screen resolution

Resizing the screen resolution

How can I make the Windows 9X change the screen resolution?

Ex: Im working in 800x600 pixels and I want that when the
my program begin, the resolution changes to 640x480.

Thanks
Marcel C.
Brazil

 

Re:Resizing the screen resolution


On Fri, 14 Sep 2001 20:26:04 -0300, "Marcel C" <ci...@bol.com.br>
wrote:

Quote
>How can I make the Windows 9X change the screen resolution?

use ChangeDisplaySettings for that.

here's the doc on it:
http://msdn.microsoft.com/library/psdk/gdi/devcons_7gz7.htm

- Asbj?rn

Re:Resizing the screen resolution


Quote
Marcel C <ci...@bol.com.br> wrote in message 3ba291ff_1@dnews...
> How can I make the Windows 9X change the screen resolution?

> Ex: Im working in 800x600 pixels and I want that when the
> my program begin, the resolution changes to 640x480.

> Thanks
> Marcel C.
> Brazil

From a previous post on this NG :

Quote
"Moises" <moi...@rech.com.br> wrote in message news:3aa6946f_1@dnews...
> How can I change the screen resolution? API? (800X600 to 1024X768 for
> instance)

Here's a method I built to force 1024x768.

function SetDisplay1024x768 : Boolean;
var
  DevMode : TDeviceMode;
begin
  EnumDisplaySettings( nil, 0, DevMode );
  DevMode.dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
  DevMode.dmPelsWidth := 1024;
  DevMode.dmPelsHeight := 768;
  Result :=
    ChangeDisplaySettings( DevMode, CDS_UPDATEREGISTRY ) =
DISP_CHANGE_SUCCESSFUL;
end;

Re:Resizing the screen resolution


You are aware that some screens may not be able to change the resolution ?
A TFT for example.

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com

Quote
Marcel C wrote:

> How can I make the Windows 9X change the screen resolution?

> Ex: Im working in 800x600 pixels and I want that when the
> my program begin, the resolution changes to 640x480.

> Thanks
> Marcel C.
> Brazil

Other Threads