Give XP Look to VB6  | 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. - <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-
<assemblyIdentity
-
version="1.0.0.0"
-
processorArchitecture="X86"
-
name="Microsoft.VB6.VBnetStyles"
-
type="win32"
-
/>
-
<description>VBnet Manifest for VB6 IDE</description>
-
<dependency>
-
<dependentAssembly>
-
<assemblyIdentity
-
type="win32"
-
name="Microsoft.Windows.Common-Controls"
-
version="6.0.0.0"
-
processorArchitecture="X86"
-
publicKeyToken="6595b64144ccf1df"
-
language="*"
-
/>
-
</dependentAssembly>
-
</dependency>
-
</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.
|  | 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. |  | 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
|  | 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.
|  | 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?
|  | 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.
|  | Similar Visual Basic 4 / 5 / 6 bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,376 network members.
|