Connecting Tech Pros Worldwide Help | Site Map

Give XP Look to VB6

Ali Rizwan's Avatar
Banned
 
Join Date: Aug 2007
Location: Lahore Pakistan
Posts: 929
#1   Aug 16 '07
Hi All.
Yesterday I was searching on the net for something new for VB when I found a technique by which I am able to convert my VB6 applications into XP styles.

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  3. <assemblyIdentity
  4.    version="1.0.0.0"
  5.    processorArchitecture="X86"
  6.    name="Microsoft.VB6.VBnetStyles"
  7.    type="win32"
  8. />
  9. <description>VBnet Manifest for VB6 IDE</description>
  10. <dependency>
  11.    <dependentAssembly>
  12.      <assemblyIdentity
  13.        type="win32"
  14.        name="Microsoft.Windows.Common-Controls"
  15.        version="6.0.0.0"
  16.        processorArchitecture="X86"
  17.        publicKeyToken="6595b64144ccf1df"
  18.        language="*"
  19.      />
  20.    </dependentAssembly>
  21. </dependency>
  22. </assembly>
Edit this code in Notepad and save it as VB6.exe.manifest, then copy it to the VB directory (where the VB6.exe file resides). Then start a new project and add some buttons, combo boxes etc and compile an exe from it. Suppose it's name is app.exe. Then rename make another manifest file and copy it to your applications directory and take a XP look.

Thanks to the person from whom I get this code.

Last edited by Killer42; Aug 17 '07 at 03:14 AM. Reason: Tidied up a bit.



pureenhanoi's Avatar
Familiar Sight
 
Join Date: Mar 2007
Location: VietNam
Posts: 175
#2   Aug 17 '07

re: Give XP Look to VB6


Quote:

Originally Posted by Ali Rizwan

... convert my vb6 applications into XP Styles ...

Yah, using Manifest file can bring up some Controls into Xp-Style (Button, TextBox, Label, Frame...). I'ver never try copy an Manifest file to VB6 directory, but using a manifest file in my App dir and call InitCommonControls() API function will get the same result.
Application using Manifest file to bring up Xp-Style will get some error on interface. If you put Label and TextBox into Frame, it will be flash when mouse move over. If you put CommandButtons, OptionButtons into Frame, the buttons' border will be rounded with black, and optionbuttons will get black back-color.
Instead of Intrinsic controls, all other controls cannot get Xp-Style (Listview, TreeView, SSTab).
If your application was small, use xp-style will get no problem. If its not, Xp-Style by Manifest isnot suit.

Last edited by Killer42; Aug 17 '07 at 03:09 AM. Reason: Shortened quote block
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#3   Aug 17 '07

re: Give XP Look to VB6


Thanks for that, Ali.

One question - could you please clarify what you mean by this sentence?

Then rename make another manifest file and copy it to your applications directory and take a XP look.
Ali Rizwan's Avatar
Banned
 
Join Date: Aug 2007
Location: Lahore Pakistan
Posts: 929
#4   Aug 17 '07

re: Give XP Look to VB6


Quote:

Originally Posted by Killer42

Thanks for that, Ali.

One question - could you please clarify what you mean by this sentence?

Then rename make another manifest file and copy it to your applications directory and take a XP look.

Hello Killer.
Suppose you have made an exe of your applicatio named myapp.
Rename your manifest file into myapp (You created) directory.
And excute the myapp.exe, and see a XP Look.

Remember rename your manifest file as myapp.exe.manifest
Ali Rizwan's Avatar
Banned
 
Join Date: Aug 2007
Location: Lahore Pakistan
Posts: 929
#5   Aug 17 '07

re: Give XP Look to VB6


Quote:

Originally Posted by pureenhanoi

Yah, using Manifest file can bring up some Controls into Xp-Style (Button, TextBox, Label, Frame...). I'ver never try copy an Manifest file to VB6 directory, but using a manifest file in my App dir and call InitCommonControls() API function will get the same result.
Application using Manifest file to bring up Xp-Style will get some error on interface. If you put Label and TextBox into Frame, it will be flash when mouse move over. If you put CommandButtons, OptionButtons into Frame, the buttons' border will be rounded with black, and optionbuttons will get black back-color.
Instead of Intrinsic controls, all other controls cannot get Xp-Style (Listview, TreeView, SSTab).
If your application was small, use xp-style will get no problem. If its not, Xp-Style by Manifest isnot suit.

Thanks for that.
I will check it. But i m using it on my application which has a large number of forms and control and is doing well i have no problem yet. And if there is any problem then delete your manifest file from your applications directory.
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#6   Aug 18 '07

re: Give XP Look to VB6


Quote:

Originally Posted by Ali Rizwan

Suppose you have made an exe ...

So, you mean I should make a copy of the manifest file, in the project folder, and rename that copy to match the name of the new application?

I just want to be clear on this - we're not talking about renaming the one in the VB folder, at all?
Newbie
 
Join Date: Oct 2007
Posts: 1
#7   Oct 30 '07

re: Give XP Look to VB6


Quote:

Originally Posted by pureenhanoi

Yah, using Manifest file can bring up some Controls into Xp-Style (Button, TextBox, Label, Frame...). I'ver never try copy an Manifest file to VB6 directory, but using a manifest file in my App dir and call InitCommonControls() API function will get the same result.
Application using Manifest file to bring up Xp-Style will get some error on interface. If you put Label and TextBox into Frame, it will be flash when mouse move over. If you put CommandButtons, OptionButtons into Frame, the buttons' border will be rounded with black, and optionbuttons will get black back-color.
Instead of Intrinsic controls, all other controls cannot get Xp-Style (Listview, TreeView, SSTab).
If your application was small, use xp-style will get no problem. If its not, Xp-Style by Manifest isnot suit.

It's easy to fix these problems. Put a PictureBox into a Frame, then put your CommandButtons, OptionButtions etc. into the Frame. It will be OK. If you wanna get a Xp-Style for Treeview, Listview....the component should be "Microsoft Windows Common Controls 5.0", the version 6.0 will not work at the Manifest..
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#8   Oct 31 '07

re: Give XP Look to VB6


Thanks for the tips.
daniel aristidou's Avatar
Needs Regular Fix
 
Join Date: Aug 2007
Posts: 493
#9   Oct 31 '07

re: Give XP Look to VB6


Does anyone know how to do anything like this for Vista?

Last edited by Killer42; Nov 1 '07 at 12:30 AM.
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#10   Nov 1 '07

re: Give XP Look to VB6


Quote:

Originally Posted by daniel aristidou

Does anyone know how to do anything like this for Vista?

Have you tried it this way?
Ali Rizwan's Avatar
Banned
 
Join Date: Aug 2007
Location: Lahore Pakistan
Posts: 929
#11   Nov 18 '07

re: Give XP Look to VB6


Quote:

Originally Posted by daniel aristidou

Does anyone know how to do anything like this for Vista?

Yeah
Download attachment from my article

Plz Comment it

GOOD LUCK
ALI

Last edited by RedSon; Dec 18 '07 at 06:17 PM.
Reply