Results 1 to 4 of 4

Thread: change colors; launch; wait; change back

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Spokane, Washington, USA
    Posts
    6
    I bought a game (apparently an older one) for my kids which only runs w/256 colors. I want to write a program which changes the colors to 256, then launches their program, waits until they exit, then changes the colors back to what it was before. Seems like someone must have done that before. Any ideas?
    Thanks

  2. #2
    Junior Member
    Join Date
    Jul 2000
    Location
    Portland, OR
    Posts
    16
    The answer seems to be no. Cause I have NO idea.

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Thumbs up

    To get the code to recieve the colour depth, goto http://www.vb-world.net, go to GRAPHICS and click on Screen Resolutions (the article). Read up and get the Colour Depth tutorials and the get Screen Res tutorials. Stick 'em in a project with no form and a module. Now put this subroutine in the module and run the project:

    Sub Main{}
    Dim BeforeCCL as string
    Dim DDW
    Dim DDH
    DDW=CInt(left(GetScreenResolution,Instr(GetScreenResolution,"x",1)))
    DDH=Cint(mid(GetScreenResolution,Instr(GetScreenResolution,"x",1)+1))

    BeforeCCL = Cint(mid(GetAvailableColours,instr(getavailablecolours,",",1)+2,instr(getavailablecolours," colours",1)-(instr(getavailablecolours,",",1)+2)))

    SetScreenResolution ddw, ddh, 8 'if 8 doesn't work, try 256
    call shell(--path to your prog---,vbnormalfocus)

    'as of right now, i'm not sure how to detect if the program is done, unless it has a classname
    End Sub
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Ask a Gutu for using handles

    If you start a program you get something like a handle to the program! So you can detect when it is finished. I saw an example for this but I'm not shure where! Just explore the MSDN!!!

    The other part is easy I saw alot of samples to change the screenres + colors! I guess there is one on this page, too!
    Sanity is a full time job

    Puh das war harter Stoff!

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