?
Solved

VB6 application in Vista

Posted on 2007-11-27
8
Medium Priority
?
2,698 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 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…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

765 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