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 ‘error messages’

Compile error when you try to create an instance of System.Drawing.Imaging.PropertyItem

Symptoms
When you try to create an instance of a PropertyItem object in a project that you try to compile, you receive one of the following error messages:
Visual Basic .NET Error

‘System.Drawing.Imaging.PropertyItem.Private Overloads Sub New()’ is not accessible in this context because it is ‘Private’.Visual Basic 2005 Error

error BC30251: Type ‘System.Drawing.Imaging.PropertyItem’ has no constructors.Visual C# .NET Error

‘System.Drawing.Imaging.PropertyItem.PropertyItem()’ is inaccessible due to its protection level.Visual C# 2005 Error

error CS0143: The type ‘System.Drawing.Imaging.PropertyItem’ has no constructors defined
Resolution
A PropertyItem object encapsulates a metadata property to be included in an image file. A PropertyItem object is not intended to be used a stand-alone object. A PropertyItem object is intended to be used by classes that are derived from System.Drawing.Image. A PropertyItem object is used to retrieve and change the metadata of existing image files, not to create the metadata. Therefore, the PropertyItem class does not have a defined Public constructor, and you cannot create an instance of a PropertyItem object.

BUG: Painting Model for BitBlt and StretchBlt Changed for VB6

Symptoms
A program that paints correctly using the BitBlt or StretchBlt APIfunctions under Visual Basic 5.0 might no longer work under Visual Basic6.0. Under Visual Basic 5.0, the bitmap is correctly displayed no matterwhether the AutoRedraw property of the Form is set to True or False.However, under Visual Basic 6.0, if the AutoRedraw property is set to True,nothing is displayed and no error messages are generated.
Resolution
In Visual Basic 6.0, set the Form’s AutoRedraw property to False or callRefresh to view the result after calling BitBlt or StretchBlt if theAutoRedraw property is set to True.

PRB: “Unable to Display Help” or “No Help Available” Error Messages for ADO from Within Visual Basic

Symptoms
When you try to access ActiveX Data Objects (ADO) documentation from within Visual Basic by pressing F1 from the code editor or from within the object browser, nothing occurs, or you receive one of the following error messages:

Unable to display help
-or-

No help available
Resolution
This problem occurs because the following items must exist to access context-sensitive help for ADO in the Visual Basic IDE: The correct version of the ADO compiled HTML help file that corresponds to the ADO version that is referenced in the project references. -and-
An entry in the registry that lists this ADO compiled HTML help file as an available HTML help file. This problem is known to occur when one or both of these items are missing.

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.