Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window Themes

Status
Not open for further replies.

AlastairOz

Technical User
Jul 27, 2010
81
0
0
AU
Is there a way to make the application independant of windows themes?
This application will be running from a Windows 2008 server via remote desktop, with windows classic desktop.
Can I include a "themes" file with the application so it will appear "themed"?
 
If you do a Google search for windows themes registry
you will a number of 'finds' which tell you where/how to change the Windows Themes setting in the Registry.

Since your VFP application can Read & Write to the Registry, you can programmatically change things.

BUT remember that you will change it for the entire workstation and all applications when you do.

So if your application makes changes, you might want to save the previous registry value and set it back again when the user exits the application.

The danger is that if the application should crash, then it will not re-set things and your users might get upset.

Typically when you Remote Desktop into a server you are only creating a user-specific 'desktop' session and its settings should be unique to that user. BUT you should test things (perhaps by making manual changes) first before you integrate code to make the changes programatically.

Good Luck,
JRB-Bldr
 
Alastair,

If you actually want to change the theme, do as JRB-Bldr suggests. But note his caveats about changing it for the entire workstation. It's not something a well-behaved application should do.

But if you just want your application to be "independent of windows themes", then put this line at the start of the main program:

_SCREEN.Themes = .F.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Not allowing the user to choose their own colors may be illegal in some countries and circumstances as some people could be color blind or sight impared in some way and they can't read the screen with your color scheme.

Craig Berntson
MCSD, Visual C# MVP,
 
Hi,

If you want to make your application a window's theme independent look, w.o.w. be sure the application has the exact look and feel you have designed regardless of the OS the 'styles' class by Greg Reichert might be a good starter.
You may download it here: scroll down and look for: "Changing Colors and Styles of controls at run-time".

Regards,

Jockey(2)
 
Hi Dave,

w.o.w. = with other words
f.w.i.w = for what it is worth
h.n.y = happy new year

Jockey(2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top