Results 1 to 6 of 6

Thread: change resolution in a window

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2004
    Location
    @ My PC
    Posts
    30

    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.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    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

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2004
    Location
    @ My PC
    Posts
    30

    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

  4. #4
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    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
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2004
    Location
    @ My PC
    Posts
    30

    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...)

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width