?
Solved

Running a VB6 program under XP without Compatibility Mode

Posted on 2005-04-05
10
Medium Priority
?
422 Views
Last Modified: 2008-01-09
I  am programming in VB6, SP6 under Win XP Pro.  My program runs fine in the IDE but when I make an EXE and try to run that, all I get is a Bong sound and nothing else.  Also, the program runs fine in Win 95/98/ME.  I haven't tried on WIn 2000.

If I set the EXE to run in Compatibility Mode, it works fine.

I've tried to display a MessageBox as the very first action (Sub Main) but that won't display so, it appears that the problem is in loading.

I will be most appreciative for any suggestions.

cncfocus
0
Comment
Question by:cncfocus
[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
  • 4
  • 3
  • 3
10 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 13708754
What do you mean by Compatibility Mode?
0
 

Author Comment

by:cncfocus
ID: 13708976
Win XP provides a Compatibility Mode for running legacy programs.  That is one of the Properties of the executable file.

1. Right click on the EXE file name
2. Click Properties
3. Click the Compatibility tab
4. Select Win 98/ME from the drop-down list
0
 
LVL 13

Expert Comment

by:iHadi
ID: 13709274
Hi

Is this problem happening with any program you write or with this specific program
Are you using any external apis or components
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!

 

Author Comment

by:cncfocus
ID: 13709484
It's just happens to this program.  Yes, I'm using some API's.  I have checked the components version numbers against the components in other programs that run OK and they are the same.

Is there some place on the net where I could find incompatibility information on the API's?
0
 
LVL 32

Assisted Solution

by:Erick37
Erick37 earned 375 total points
ID: 13709545
Are you using the API through a Type Library reference, or from Declare statements?

0
 
LVL 13

Expert Comment

by:iHadi
ID: 13709610
you can visit the following site to view api list with coments and compability and examples on all apis in visual basic

www.allapi.net
0
 
LVL 13

Accepted Solution

by:
iHadi earned 375 total points
ID: 13709641
If you can post the api's you're using we might help
0
 

Author Comment

by:cncfocus
ID: 13711301
The following API's are declared in this program.

BitBlt
CallWindowProc
CloseClipboard
CloseHandle
CopyFile
CopyMemory
CreateCompatibleBitmap
CreateCompatibleDC
CreateSolidBrush
DeleteFile
DeleteObject
EmptyClipboard
ExpandEnvironmentStrings
FillRect
FindWindow&
FormatMessage
GetLongPathName
GetShortPathName
GetSystemDirectory
GetVersionEx
GetVersionExA
GetVolumeInformation&
GetWindowLong
GetWindowsDirectory
InternetGetConnectedState
keybd_event
LockWindowUpdate
OpenClipboard
OpenProcess
PlaySound
RegCloseKey
RegCreateKey
RegDeleteKey
RegDeleteValue
RegEnumValue
RegOpenKey
RegOpenKeyEx
RegQueryValueEx
RegSetValue&
RegSetValueEx
SelectObject
SendMessage
SetBkColor
SetClipboardData
SetParent
SetWindowLong
SetWindowPos
ShellExecute
ShellExecute
SHGetFileInfo
ShowCursor
Sleep
WaitForSingleObject

0
 
LVL 32

Expert Comment

by:Erick37
ID: 13712198
Did you find the problem?
0
 

Author Comment

by:cncfocus
ID: 13713424
Yes, I posted a note before.  I don't know what happened to it.

The problem was a couple of 3rd party controls (cmax20.ocx and sptbdock.ocx) that are not Manifest compatible.  When I remove the Manifest file, everything works OK except I don't get the XP buttons, scroll bars, etc.

I'll look for replacements for these controls.

I split the points.

Thanks,
cncfocus
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

801 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