Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘Windows’

FIX: Visual Basic 5.0 Crashes When Shutting Down Forms

Symptoms
Closing a modal form in the Visual Basic 5.0 design environment may causeone of the following errors:

“Access Violation: Unhandled exception in VB5.EXE 0xC0000005: AccessViolation” (Windows NT4)
-or-

“VB has caused an invalid page fault in module VB5.EXE at 0137:00419f1e”(Windows 95, Windows 98, and Windows Me)
Resolution
Visual Basic is trying to get the thread data from a control after it hasbeen unloaded. The error code that signaled that the control got unloadedis not handled properly.

FIX: Error in VBA6.DLL Using a Late Bound Recordset When at BOF or EOF

Symptoms
If you reference a field value in an ActiveX Data Objects (ADO) recordset when BOF or EOF is true, if you use late binding, and if you concatenate it to a string, an unhandled exception occurs in VBA6.DLL and causes an error.
Under Windows 95 or Windows 98, you receive the following error message:

VB6 Has Caused An Error in VBA6.DLLUnder Windows NT 4.0, you receive the following Dr. Watson error:

An application error has occurred and an application error log is being generated. VB6.EXE. Exception: access violation (0xc0000005) address 0×0fa91abdUnder Windows 2000, Visual Basic quits.
Resolution
If you pass a reference to an ADO field value when BOF or EOF is true, the following error message normally appears:

Either BOF or EOF is true, or the current record has been deleted. Requested operation requires a current record.However, if you reference a field value in an ADO recordset when BOF or EOF is true, if you use late binding, and if you concatenate it to a string, an unhandled exception occurs in VBA6.DLL and causes the above-mentioned error messages.

FIX: Can’t Have Menu with No Caption Bar/Buttons/Control Box

Symptoms
You can’t add a menu that has no caption, no maximize/minimize buttons,and no control-menu box to a form.
Resolution
This feature is not supported in Visual Basic in Windows version 3.0or 3.1 because of a bug in the Microsoft Windows menu driver thatprevents Windows from painting menus correctly.

FIX: Application Setup Errors While Displaying “Copying Files, Please Stand By”

Symptoms
When you run a Setup that was created using the Package and Deployment Wizard (PDW), you receive one of the following error messages:

Cannot start main setup program! (CreateProcess() returned error code 0×000000C1H)

VB6stkit.dll is not a valid Windows NT image

The system could not locate the file ‘<Temp Folder>\Msftqws.pdw\Vb6stkit.dll’. Would you like to browse for the file yourself?

The system could not locate the file ‘<Temp Folder>\Windows\Temp\Msftqws.pdw\St6unst.exe’. Would you like to browse for the file yourself? where <Temp Folder> is the Windows\Temp folder on Windows 95, Windows 98, or Windows Me or the folder specified by the TEMP environment variable on Windows NT.
Resolution
If the symptom occurs on all target computers where you run Setup, the cause of the problem is most likely one of the following: A damaged diskette.A damaged setup file. If the symptom only occurs on some target computers, the cause may be one of the following: Left-over files from a previous installation attempt.A machine-specific issue.

BUG: VFP CDX with EMPTY Function is Not Recognized in VB

Symptoms
FoxPro indexes that contain the function EMPTY or ISBLANK will not berecognized in Visual Basic. Indexes with this function are recognizedby Visual Basic 4.0. The following error will be generated under NT and Windows 2000:

An application error has occurred
and an application error log is being generated.
VB5.exe
Exception Access Violation (0xc0000005),Address ………Visual Basic is terminated by this error.
In Windows 95 and Windows 98, no error is returned because the index is notseen.
Resolution
Compare field to ” ” instead of using EMPTY. The same results are achieved.

BUG: GPF in Data Access Objects After You Install SQL Server Client

Symptoms
If you install the Spanish version of the SQL Server 7.0 Client utilities on a computer that is running Microsoft Windows 95 OEM Service Release 2 (OSR2), a General Protection Fault (GPF) error occurs when you use Data Access Objects (DAO) to open a database.
This problem does not occur on computers that are running the Spanish version of Microsoft Windows NT 4.0, nor does it occur on computers that are running the English version of Windows 95.
Resolution
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.