?
Solved

XP Theme embeded in the app

Posted on 2005-03-08
15
Medium Priority
?
516 Views
Last Modified: 2010-04-05
Hi.

I'd like to know if its possible to embed a XP theme inside my app.
For example the user may use the classic blue theme in his PC but the app is like he runs Silver XP Theme.

Thanks in advance.
0
Comment
Question by:CodedK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
  • +1
15 Comments
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 13492139
you can use the SetWindowTheme function to specify the theme you want to use for a specific window

uses
  uxTheme;

SetWindowTheme()

see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/functions/setwindowtheme.asp

for more information
0
 
LVL 16

Author Comment

by:CodedK
ID: 13492211
Thanks..

Can u please help me little more...
This is the command:
SetWindowTheme: function(hwnd: HWND; pszSubAppName: LPCWSTR;pszSubIdList: LPCWSTR): HRESULT; stdcall;

How do i put Silver XP Theme?
0
 
LVL 5

Accepted Solution

by:
Hypoviax earned 800 total points
ID: 13492419
You can use a theme/skin program to assign whichever type of skin you want - all the different XP skins aswell as others:

www.link-rank.com

All though it costs for a full version it is worth it.

Regards,

Hypoviax

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Assisted Solution

by:mhamini
mhamini earned 400 total points
ID: 13493047
hi ...

see this article for all api rules and techs:

http://www.akzhan.midi.ru/devcorner/articles/Windows%20Visual%20Styles%20(Themes)%20API%20Support%20in%20Your%20controls%20Eng.htm

and if you work with delphi6 or 5 , check this freeware : (only 917 kb)
http://scripts.soft-gems.net/download.php?ID=17

or see this powerfull soft : (more than 12 mb / freeware)
http://www.lmd.de/downloads/lmd70se/lmd70se_d7.zip

good luck.


0
 
LVL 1

Expert Comment

by:mhamini
ID: 13493083
sorry about bad article link in previous comment ...
for viewing article download this rar :
www.mizan3.com/delphi/Support for Windows Visual Styles (Themes) API in your controls.rar
0
 
LVL 1

Expert Comment

by:mhamini
ID: 13493094
oh god ...
sorry again ...
true article link :
http://www.mizan3.com/delphi/delphitheme.rar
excuse me.
0
 
LVL 1

Expert Comment

by:mhamini
ID: 13493180
hi friend ...
very good idea finded!!!

1) in your program folder , open a new notepad(txt) file. paste this code to it :

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity
  type="win32"
   name="DelphiApplication"
   version="1.0.0.0"
  processorArchitecture="*"/>
 <dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       publicKeyToken="6595b64144ccf1df"
       language="*"
       processorArchitecture="*"/>
   </dependentAssembly>
 </dependency>
</assembly>

2) save the file with name : yourapp.exe.manifest
    that "yourapp" is your application name.

3) run your application and enjoy with xp themes.

Regards.
0
 
LVL 1

Expert Comment

by:mhamini
ID: 13493393
A Fact about "SetWindowTheme" Function :

SetWindowTheme is used to turn theming off for a particular window or to
restore the theme. It is not used to set a custom Theme.
To have your application use a custom theme you need to ownerdraw the window
and controls.

then i think , now you must use freewares (previous comments) or some code except this func.

Regards.
0
 
LVL 16

Author Comment

by:CodedK
ID: 13495918
Hi.
 mhamini what is that with the manifest ?
Did that but othing happened?
0
 
LVL 1

Expert Comment

by:mhamini
ID: 13499807
Hi friend ...

{************************************************}
FIRST :

Manifests , attach some visual settings to controls of your app.
in Delphi 7 , in win32 pallete , is a nice component to view the difference! (XPManifest)
I uploaded two programs for you to download and see the difference :

1) www.mizan3.com/delphi/With-XPManifest.rar
2) www.mizan3.com/delphi/Without-XPManifest.rar

so i guess this component be usefull to you.

{************************************************}
SECOND :

I have an article that explain xp styles in delphi programming.
this article and source code , explain true way of Drawing controls! i think is usefull :

+) www.mizan3.com/delphi/Visual-Styles-in-Delphi.rar

{************************************************}
THIRD :

I hope my activate be usefull for your perpose ... any comments is accepted(!!!)  :)

Regards.
Mohammad Hosein Amini (mhamini)
mhamini@gmail.com
mohammadhoseinamini@yahoo.com
0
 
LVL 16

Author Comment

by:CodedK
ID: 13501197
Hi mhamini.
I ve got Delphi 7. I know about XP Manifest.
I am asking if it is possible with code to have your form in every PC
have the XP Silver style, even if the PC runs on XP Blue style or some other style (Classic maybe).
I thought that this was the manifest you gave me.
Thanks for ur response.
0
 
LVL 16

Author Comment

by:CodedK
ID: 13503697
Thanks.
I found both components useful.
I prefer vcl though by Hypoviax.
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 13503734
If you are not writing a commercial peice of software you could easily make do with the trial version of VCL Skins. I found prior to getting the full version, that you can remove the VCL Demo in the caption by making the caption:

NORMAL TEXT                                                                                                                                   .

I.e. Your text with a single dot at the end. This spaces "VCL demo" off the screen so it cannot be seen,

Thanks,

Hypoviax
0
 
LVL 1

Expert Comment

by:mhamini
ID: 13504605
Good Luck my Friend.
0
 
LVL 1

Expert Comment

by:mhamini
ID: 13504723
And now see this story :

I asked your question and mshkolnik replied ...

me :
 
(exactly your phrase)
if it is possible with code to have your form in every PC
have the XP Silver style, even if the PC runs on XP Blue style or some other style (Classic maybe).

{++++++++++++++++++++++++++++++++++++++}

mshkolnik :

Any application uses the default defined theme. So you can't.
Of course, application can draw anything without standard theming (as suggested third-party solutions for drawing) but this is not an answer for your question.
With best regards, Mike Shkolnik
http://www.scalabium.com

{++++++++++++++++++++++++++++++++++++++}

me again :

dear Mike! ... "You Can Not" can be a good answer!
thank you very much.

{++++++++++++++++++++++++++++++++++++++}

Link of Story :
+) http://www.delphipages.com/threads/thread.cfm?ID=130368&G=130368&SAR=TRUE

{++++++++++++++++++++++++++++++++++++++}

then, you seem to be true in choosing Components for your perpose.
Good Luck :)



0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question