Solved

VB6 application in Vista

Posted on 2007-11-27
8
2,697 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
[X]
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
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

688 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