Search Tools Links Login

VB6 and windows XP styles


Visual Basic 6, or VB Classic

Edit and run VBasic programs on winXP with the real XP controls Style.
Ship Your Application Both on Windows XP and Earlier Versions of Windows with style ;)

Original Author: Megalos

Code

Not many comments here.

Just follow instructions and let me know if you have any problem.

1st

copy this code and create a new file with this name "vb6.exe.manifest" in your
system32 or in the folder where your VB6.exe is.



/*--------save as vb6.exe.manifest anything after this
line -----*/


"1.0" encoding="UTF-8"
standalone="yes"?>

"urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">

"win32"
processorArchitecture="*" version="6.0.0.0"
name="mash"/>

Enter your Description Here






type="win32"

name="Microsoft.Windows.Common-Controls" version="6.0.0.0"

language="*"

processorArchitecture="*"

publicKeyToken="6595b64144ccf1df"

/>









/*----end here-- do not include this line--*/



2nd

start your VBasic and you will see it like it was remade for XP.

after this VB is using the new ComCtl32.dll and is running the applications with
this dll as default.

3rd

after you compile the app. you will see that is not using the XP controls
style.!!!???

To use XP style you will need a manifest file like before but with the
applications name this time. so if you have "XPdemo.exe" you will need a file
with the name "XPdemo.exe.manifest" with the same contents like the
"vb6.exe.manifest" or just copy and rename the file "vb6.exe.manifest".

4th

put in your applications these lines or it will not work with the XP controls
style.



'**************

'just to enable the new ComCtl32.dll if ' is there.


Private Declare Function InitCommonControls
Lib "comctl32.dll" () As Long

Private Sub Form_Initialize()

InitCommonControls

End Sub

'continue with your app. code

'***************



note that your application is still running on any older version windows with no
any problems but he he with not the XP styles.

(under win XP)

the same trick will be possible on any program just use the "programname.exe.manifest"
and you will see.

If you don't have windows XP but you want to give the option to your programs to
run on XP with the XP styles enable just do the same and when your programs run
on XP will be full compatible with the XP styles.

This is some ideas i got reading the MSDN library here.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp


and here is my site where im trying to do my best but i dont have much time

http://sourcecode.pcy.net/ ......any
one to help me? :)

CU and have a good day

Megalos Cy


About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 107 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.