change resolution in a window
hi
i want to know how can i run myprog in a window with desired resolution,
without changing the resolution of desktop ?
you know in some game (like nfs if i'm not wrong) we can play in a window (not fullscreen) with nice quality and also desktop apears normally.
Re: change resolution in a window
That depends what you're doing. DirectX and OpenGL support different resolutions inside the window.. thats easy enough, they are usually an important part in creating your games window.
If you're writing a game purely through GDI (BitBlt, DC's, etc), its a bit trickier, unless you're writing it in VB6. In vb6, forms and pictureboxes have a scale property which you can change to accomodate a different "resolution".
If its GDI and not written in VB6.. it'll get a bit ugly.
chem
Re: change resolution in a window
with vb6 is it possible to run a norml proj(with forms and label and...) into the directX window with different resolution ?
i need sample or more help about window prog(or game) with different resolution from desktop...(with or without DX).
thanx
Re: change resolution in a window
You have two choices:
+ Remember and ChangeDisplaySettings API: http://allapi.mentalis.org/apilist/ChangeDisplaySettings.shtml
OR
+ Learn DirectX7 or DirectX8: directx4vb.vbgamer.com
Re: change resolution in a window
thanX
i already use api for chnge display setting ,but now i don't want to change it.
i just want to have my window with my resolution (not fullscreen).
according to your posts i think it is possible to run my vb prog in DX window.
am i right ? alittle help for how ?(set parent api or what...)
Re: change resolution in a window
If it is just a normal form (rather than something in directX already), the easiest method is probably to resize the controls etc appropriately, which can be seen in this FAQ article: How can I make my form look the same at different sizes?