Change Windows desktop color

..how can I change the color of desktop in Windows 95/98 ??
I'm using Delphi 3,  SetSysColor is just temporary for the section, I want to change the color permanently.

Thanks.
uffaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AttarSoftwareCommented:
It is in the registry...

HKEY_CURRENT_USER\Control Panel\Colors\Background

if you set the value here then it will change next time you reboot windows, so maybe a combination of the two methods is required....

Tim.
0
uffaAuthor Commented:
.thanks, but can you give me an actual example (a code segment) ?
0
AttarSoftwareCommented:
For ten points, its a bit of a liability, but...ok
make sure you include the Registry file in your uses clause, then:

procedure SetIt( r, g, b : byte ) ;
var
  reg : tRegistry ;
begin
  reg := tRegistry.Create ;
  if( reg.OpenKey( '\Control Panel\Colors', false ) ) then
  begin
    reg.WriteString( 'Background', IntToStr( r ) + ' ' + IntToStr( g ) + ' ' + IntToStr( b ) ) ;
    reg.CloseKey ;
  end ;
  reg.Free ;
end ;

Or something like that...

You may need to fiddle this, as I havent got my computer on (home time), and so I can't test it...but it should work...  Check if it does with regedit...

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

AttarSoftwareCommented:
Good luck :)

Tim.
0
uffaAuthor Commented:
Adjusted points to 20
0
uffaAuthor Commented:
.thanks for the code segment, I didn't know about the reg. object.  I increased the points to 20, how is that?
0
AttarSoftwareCommented:
Wonderful   =OD

Cheers Uffa :)

Tim.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.