Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • Last Modified:

XP Theme embeded in the app

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
CodedK
Asked:
CodedK
  • 8
  • 4
  • 2
  • +1
2 Solutions
 
BlackTigerXCommented:
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
 
CodedKAuthor Commented:
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
 
HypoviaxCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
mhaminiCommented:
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
 
mhaminiCommented:
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
 
mhaminiCommented:
oh god ...
sorry again ...
true article link :
http://www.mizan3.com/delphi/delphitheme.rar
excuse me.
0
 
mhaminiCommented:
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
 
mhaminiCommented:
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
 
CodedKAuthor Commented:
Hi.
 mhamini what is that with the manifest ?
Did that but othing happened?
0
 
mhaminiCommented:
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
 
CodedKAuthor Commented:
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
 
CodedKAuthor Commented:
Thanks.
I found both components useful.
I prefer vcl though by Hypoviax.
0
 
HypoviaxCommented:
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
 
mhaminiCommented:
Good Luck my Friend.
0
 
mhaminiCommented:
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 8
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now