Re:Changing Screen Resolution
Hi,
try the following:
procedure ChangeRes;
var
DM: TDevMode;
Result1: LongInt;
begin
DM.dmSize := SizeOf(DM);
DM.dmPelsWidth := 1024; // enter desired width here
DM.dmPelsHeight := 768; // enter desired height here
DM.dmfields := DM_PELSHEIGHT or DM_PELSwidth;
Result1 := ChangeDisplaySettings(DM, CDS_UPDATEREGISTRY);
if Result1 <> DISP_CHANGE_SUCCESSFUL then
ShowMessage('Failure')
else
ShowMessage('Success');
end;
I hope this will work. By the way, you must be sure the mode you are
setting is supported. From what I see, you are setting only the width
and height. The new width and height resolution may not support the
current color depth for example. I'm trying to say that the code may be
correct and still doesn't work if the new mode is not supported. Bye.
Quote
Jean Cilliers <jcc...@icon.co.za> wrote in message
news:7pgf1l$b2o$1@news.is.co.za...
Quote
> Mike Shkolnik wrote in message <7pbe8r$re...@news.lucky.net>...
> I tried out the sample code mike supplied and it appears to work,
> The result comes back as chaged and my screen flashes for a moment but
it
> doesn't actually chage my screen resolution
> do i need extra code?
> platform win98
> d3
> voodoo3 display adator