?
Solved

VB6 application in Vista

Posted on 2007-11-27
8
Medium Priority
?
2,702 Views
Last Modified: 2008-12-03
When I compile my VB6 program, will it run on a Windows Vista platform?  Has anyone run into any problems?
0
Comment
Question by:al4629740
8 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 20361584
as long as you have the runtime ,there is no problem
0
 

Author Comment

by:al4629740
ID: 20361622
what does that mean?
0
 
LVL 15

Expert Comment

by:spprivate
ID: 20361642
When you want to deploy the application ,create a package using setup wizard and then install it in Vista.The setup will take care of all the dependencies (dlls need to run VB app) and thats it
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Accepted Solution

by:
spprivate earned 2000 total points
ID: 20361656
Just got it.Some more considerations to make your app run in Vistal



Application Changes

Remove SendKeys calls and replace them with API code.
Use the HKEY_CURRENT_USER in the registry for the settings of your application. Do not write to HKEY_LOCAL_MACHINE.
If you are using ADO use 2.8 and above in your application.
If you are using XML use XML version 3.0 and above in your application
If you are using the PlaySound API, if your wave files are not PCM but mpeg layer-3 make sure your mpeg wave files are Stereo and not Mono.
If you need the Printer Setup dialog either using the Common Dialog Control, or by using the API functions, the dialog will not return the correct number of copies. The dialog will always return 1 on Vista. The way around this bug is to create your own Printer Setup dialog box and when you get the correct number of copies you will have to send to the printer multiple times to print out multiple copies. Here is a link that discusses this issue in details.
Relocate settings files, data files etc into "Common Files" (C:\Users\Public) instead of "Program Files". You should use the API calls to locate these folders because the folders are in different paths for different machines and OSs. Here is a link that discusses this issue in details.
Per-user settings should be in a separate file located under "Application Data" and this should also be requested of the OS in the same manner.
For "Common Files" ask for ssfCOMMONDATA (or CSIDL_COMMON_APPDATA).
For "Application Data" ask for ssfAPPDATA (or CSIDL_APPDATA). To properly use these filesystem locations you are supposed to create a subdirectory for your "company name" and under that another for your "application name." Then put your settings or data under that.
Any working "document" files that are meant to be found and manipulated by the user (i.e. via Explorer) should be placed into CSIDL_PERSONAL ("My Documents") or CSIDL_COMMON_DOCUMENTS ("All Users\Documents").
DeleteSetting no longer works without a key. e.g. DeleteSetting "Mytestprogram, "General" fails to delete anything and gives an error. but DeleteSetting "Mytestprogram, "General","keyname" works fine. It seems that key is no longer Optional in: DeleteSetting appname, section[, key] as in documentation. Credit: roylow

Setup Package Changes

Administrator Account running your Setup Package

Require users to "Run as Administrator" directly in your setup package.
Inform users to right-click the setup package and click "Run As Administrator".

Non-Administrator Account running your Setup Package

Remove the VB6 Runtime files, MDAC and any of these files from your setup package.

Visual Basic IDE Changes

If you are using Visual Basic 6.0 on Vista, you will notice a latency in speed. This can be solved by using "Windows Classic Theme" or "Windows Vista Basic theme" instead of the new Vista Theme with the Aero effect.

Useful Links

Teach Your Apps To Play Nicely With Windows Vista User Account Control
Understanding and Configuring User Account Control in Windows Vista
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20361689
you have to execute your installer "as administrator", if not, it won't work at all due security protections of Vista.
0
 
LVL 22

Expert Comment

by:danaseaman
ID: 20362228
'See this link for a list of Vb6 Ocx/Dll that ship with Vista.
Also a second list of Ocx/Dll that have been tested but do not ship with Vista and need to be included in your deployment package.

'Read Support Statement for Visual Basic 6.0 on Windows® Vista™
http://msdn2.microsoft.com/en-us/vbrun/ms788708.aspx

0
 

Author Comment

by:al4629740
ID: 20363358
I installed my program on Vista and this is the error I got:

Run time error '214746259 (8004005)':
[DBNETLIB]
ConnectionOpen (Connect ().] SQL server does not exist or access denied.


0
 
LVL 15

Assisted Solution

by:spprivate
spprivate earned 2000 total points
ID: 20365744
it has to do with your connection string with sql server details.
http://support.microsoft.com/kb/328306
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question