Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Running a VB6 program under XP without Compatibility Mode

Posted on 2005-04-05
10
Medium Priority
?
427 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

580 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