Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB6 application in Vista

Posted on 2007-11-27
8
2,693 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 15

Accepted Solution

by:
spprivate earned 500 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 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