[gameprogrammer] Re: 3D Model Format
- From: "Sam Nova" <sam@xxxxxxxxxxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Mon, 8 Oct 2007 20:50:15 +0200
You set the paper width and not the Pels width..
I just searched on Google for "Deplhi ChangeDisplaySettings" and found
this.
uses Windows;
function SetScreenResolution(Width, Height: integer): Longint;
var
DeviceMode: TDeviceMode;
begin
with DeviceMode do begin
dmSize := SizeOf(TDeviceMode);
dmPelsWidth := Width;
dmPelsHeight := Height;
dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
end;
Result := ChangeDisplaySettings(DeviceMode, CDS_UPDATEREGISTRY);
end;
I got NO clue about Delphi, so don't know if it works...
Oh, advise.. Write variable, function names and comments in English..
Good practice for yourself and makes it easier when you show code to
people.
Best,
Sam
> -----Original Message-----
> From: gameprogrammer-bounce@xxxxxxxxxxxxx
> [mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of
> Yasser Gonzalez Soto
> Sent: Saturday, October 06, 2007 1:51 PM
> To: gameprogrammer@xxxxxxxxxxxxx
> Subject: [gameprogrammer] Re: 3D Model Format
>
>
> check this delphi code:
> //--------------------------------------------------------------
> function Cambiazo(ancho,alto:integer):integer;
> var
> dm:TDeviceMode;
> r:integer;
> begin
> dm.dmSize:=sizeof(TdeviceMode);
> dm.dmPaperWidth:=ancho;
> dm.dmPelsHeight:=alto;
> dm.dmFields:=DM_PELSWIDTH or DM_PELSHEIGHT;
>
> result:=ChangeDisplaySettings(dm,CDS_UPDATEREGISTRY);
>
> end;
>
> buttonClick(Sender:TObject);
> begin
> Cambiazo(800,600);
> end;
>
> -------------------------------------------//
> doesn't make the resolution chage. Why. Help me anybody please
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: 3D Model Format
- From: Yasser Gonzalez Soto
- References:
- [gameprogrammer] Re: 3D Model Format
- From: Yasser Gonzalez Soto
Other related posts:
- » [gameprogrammer] 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- » [gameprogrammer] Re: 3D Model Format
- [gameprogrammer] Re: 3D Model Format
- From: Yasser Gonzalez Soto
- [gameprogrammer] Re: 3D Model Format
- From: Yasser Gonzalez Soto