PDA

Click to See Complete Forum and Search --> : change colors; launch; wait; change back


tomculb
Jul 1st, 2000, 08:50 AM
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

VB Knowadge
Jul 17th, 2000, 12:52 AM
The answer seems to be no. Cause I have NO idea. :)

Sastraxi
Jul 19th, 2000, 02:35 PM
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

/\/\isanThr0p
Jul 21st, 2000, 01:48 AM
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!