Getting XP interface with VB6
August 25th, 2007 Noor Posted in Visual Baisc 6.0 |
Most of non-advanced programmers in VB6 have face this problem. The applications they develop look kind of “old school” when run on a XP machine. I too faced this problem until I found the answer!
So this is what you have to do:
step1: create a module (you can name it whatever you like)
step2: paste the code below in it.
Step 3: on each form you open call this function in form_intinitialize.
Example:
(if you do not call the function then it will not show the xp style on that form)
step 4:
create a textfile and paste the following code in it:
Step5: Rename the file as <yourexefilename>.exe.manifest and place it in the same folder where you place your .exe file
step6: This is to make you vb6 dev application to have the XP look. go to the directory where you have vb6.exe (if you have installed vb in c drive then it may be in C:\Program Files\Microsoft Visual Basic\VB98). then make a textfile with and paste the code given in step 4 and then rename it as vb6.exe.manifiest
click on you vb6.exe and see the change.
Note: after doing the above the interface will change from theme to theme.

September 12th, 2007 at 1:28 pm
I’ve done what you say (and there’s other guys published basically the same thing on the web). I found
a) I can make one call to InitComctl32 in the Main startup routine; calling it separately for each form doesn’t seem to be needed
b) everything comes up in XP style except for my listviews which refuse to change their column headers from the old style. I know what the new style looks like, because having made VB take on the XP styles in the IDE, when I open for example the addin manager, its listview column headers come up in the new style.
Any thoughts?
Nick.
February 27th, 2008 at 9:19 pm
I am having the exact same problem as Nick. It will not completely change the ListView to the XP style, where the headers are still the old style.