Symptoms
The information below includes the documentation and workarounds for VisualBasic 6.0. This information can also be found in the README.htm file thatships with Visual Basic 6.0 on the Visual Basic 6.0 CD-ROM. Please see theREFERENCES section of this article for a list of the Microsoft KnowledgeBase articles relating to the Visual Basic 6.0 readme.
Following is a list of all parts of the readme file:
Part 1.Important Issues – Please Read First!
Part 2.Data Access Issues and DataBinding Tips
Part 3.Control Issues
Part 4.Language Issues
Part 5.Samples Issues
Part 6.Wizard Issues
Part 7.Error Message Issues
Part 8.WebClass Designer Issues
Part 9.DHTML Page Designer Issues
Part 10. Extensibility issues
Part 11. Miscellaneous Issues
Part 12. Microsoft Transaction Server (MTS) Issues
Part 13. Dictionary Object
Part 14. Visual Component Manager
Part 15. Application Performance Manager
Resolution
Lightweight Controls Must Be BorderlessWhen creating a lightweight User control by setting the Windowless propertyto True, the BorderStyle property is invalidated. By definition alightweight control has no border.
If you first set the BorderStyle property to anything other than 0 – Noneand subsequently change the Windowless property to True, you will receivean error message “Windowless UserControls only support BorderStyle = None”.Run Time Error 711: Compiled .Exe Doesn’t Contain Information AboutUnreferenced Control Causing Controls.Add to Fail
Problem:
Create a new Standard EXE. Form1 is created by default.Add a user control to the project.Add the following code:

Dim WithEvents x as VBControlExtenderPrivate Sub Form_Load ()Set x = Controls.Add (“Project1.Usercontrol1″, “XX”)x.Visible = TrueEnd Sub On the File menu, click Make Project1.exe (Don’t run the project.)Run the EXE.
Result: You get an error (711) stating that Project1.Usercontrol1 is aninvalid ProgID since no info about it can be found in the exe.
Solution: Before compiling the project, under the Project menu, clickProject1 Properties. On the Make tab, clear the “Remove informationabout unused ActiveX controls” check box.
Remarks
By default, ActiveX controls that are referenced but not placed on any typeof form at design time are not available for Controls.Add at runtime or inan executable.
Hierarchical FlexGrid Control: ColWordWrapOption, ColWordWrapOptionBand,
ColWordWrapOptionFixed, ColWordWrapOptionHeader PropertiesThe following properties are part of the Hierarchical FlexGrid control’sfeature set but are not documented in the control’s help:
ColWordWrapOption, ColWordWrapOptionBand, ColWordWrapOptionFixed,ColWordWrapOptionHeader. Descriptions and syntaxes for these properties arefound below. Settings for all properties are the same, and can be found atthe bottom of the topic:
ColWordWrapOption Property
Returns or sets a value that specifies how text is wrapped in a specifiedcolumn.
Syntax

object.ColWordWrapOption (Index) = integer
The ColWordWrapOption property syntax has these parts:

PartDescription—————————————————-objectAn object expression that evaluates to a HierarchicalFlexGrid control.IndexLong. The number of the column to get or set word wrapon. The value must be in the range of -1 to Cols – 1.Setting this value to -1 selects all columns.integerA numeric expression that determines how words will wrap,as shown in settings.
ColWordWrapOptionBand Property
Returns or sets a value that specifies how text is wrapped in a specifiedband.
Syntax

object.ColWordWrapOptionBand (BandNumber, BandColIndex) = integer
The ColWordWrapOption property syntax has these parts:

PartDescription—————————————————-objectAn object expression that evaluates to a HierarchicalFlexGrid control.BandNumberLong. The number of the band to get or set word wrap on.The value must be in the range of 0 to Bands – 1.BandColIndexLong. The number of the column to get or set word wrapon. This optional parameter defaults to -1, indicatingall columns in the band. Valid values are -1 to Cols -1.integerA numeric expression that determines how words will wrap,as shown in settings.
ColWordWrapOptionBand Property
Returns or sets a value that specifies how text is wrapped in a specifiedband.
Syntax

object.ColWordWrapOptionBand (BandNumber, BandColIndex) = integer
The ColWordWrapOption property syntax has these parts:

PartDescription—————————————————————objectAn object expression that evaluates to aHierarchical FlexGrid control.BandNumberLong. The number of the band to get or setword wrap on. The value must be in the rangeof 0 to Bands – 1.BandColIndexLong. The number of the column to get or setword wrap on. This optional parameterdefaults to -1, indicating all columns in theband. Valid values are -1 to Cols -1.integerA numeric expression that determines howwords will wrap, as shown in settings.
ColWordWrapOptionFixed Property
Returns or sets a value that specifies how text is wrapped in a specifiedfixed column.
Syntax

object.ColWordWrapOptionFixed(index) = integer
The ColWordWrapOptionFixed property syntax has these parts:

PartDescription—————————————————-objectAn object expression that evaluates to a HierarchicalFlexGrid control.indexLong. The number of the column to get/set word wrap on.This optional parameter defaults to -1. Valid values are-1 to Cols -1.IntegerA numeric expression that determines how words will wrap,as shown in settings.
ColWordWrapOptionFixed Property
Returns or sets a value that specifies how text is wrapped in a specifiedfixed column.
Syntax

object.ColWordWrapOptionFixed(index) = integer The ColWordWrapOptionFixed property syntax has these parts:

PartDescription——————————————————————objectAn object expression that evaluates to aHierarchical FlexGrid control.indexLong. The number of the column to get/setword wrap on. This optional parameterdefaults to -1. Valid values are -1 to Cols-1.integerA numeric expression that determines howwords will wrap, as shown in settings.
ColWordWrapOptionHeader Property
Returns or sets a value that specifies how text is wrapped in columnheaders.
Syntax

object.ColWordWrapOptionHeader(BandNumber, BandColIndex) = integer The ColWordWrapOptionHeader property syntax has these parts:

PartDescription——————————————————————–objectAn object expression that evaluates to aHierarchical FlexGrid control.BandNumberLong. The number of the band to get/set wordwrap on. The value must be in the range of 0to Bands – 1.BandColIndexLong. The number of the column to get/setword wrap on. This optional parameterdefaults to -1 indicating all column headersin the band. Valid values are -1 to Cols -1.integerA numeric expression that determines howwords will wrap, as shown in settings.
Settings
The settings for integer are:

ConstantValueDescription————————————————————flexSingleLine0(Default) Displays text on asingle line only.flexWordBreak1The lines are automaticallybroken between words.flexWordEllipsis2Truncates text that does notfit in the rectangle and addsellipsis.flexWordBreakEllip3Breaks words between lines andsisadds ellipsis if text doesn’tfit in the rectangle.
Hierarchical FlexGrid Control: ColIsVisible and RowIsVisible Properties are
Read OnlyThe ColIsVisible and RowIsVisible properties are read-only properties andcannot be set programmatically. You can use the properties to test whethera column or row is visible, and hide the column or row, if appropriate, asshow below:

With MSHFlexGrid1If .ColIsVisible(1) Then .ColWidth(1) = 0If .RowIsVisible(1) Then .RowHeight(1) = 0End With
Hierarchical FlexGrid Control: Additional Settings for GridLines,GridLinesBand, GridLinesFixed, GridLinesHeader, GridLinesIndent, and
GridLinesUnpopulated PropertiesTwo additional settings are possible for the following properties:
ridLines, GridLinesBand, GridLinesFixed, GridLinesHeader,GridLinesIndent, GridLinesUnpopulated Properties. The possible settingsare show in the table below:

ConstantValueDescription—————————————————————flexGridDashes4Dashed Lines. Sets line stylebetween cells to dashed lines.flexGridDots5Dotted Lines. Sets line stylebetween cells to dotted lines.
Remarks:
These settings can be used in addition to flexGridNone, flexGridFlat,flexGridInset and flexGridRaised.
DataRepeater Control: Setting Public Properties Affect only the Current
ControlWhen creating a user control to be used in a DataRepeater control, be awarethat public properties of the control will be set only on the currentcontrol (the “live” control with the focus). For example, if you expose theFont property of a user control, at run time, resetting that property (asshown in the example code below) will only affect the current control inthe DataRepeater control. The font of repeated controls will not beaffected.

Private Sub Command1_Click()’ Only the current control’s Font will be affected.DataRepeater1.RepeatedControl.FontName = “Courier”End Sub
The corresponding code in the user control would resemble the following:

Public Property Get FontName() As StringFontName = txtProductName.Font.NameEnd PropertyPublic Property Let FontName(ByVal newFontName As String)txtProductName.Font.Name = newFontNameEnd Property
TabStrip Control: Separators show only when the Style property =
TabFlatButtonsSeparators will only appear on a TabStrip control when the Style propertyis set to TabFlatButtons. An example is shown below:

Private Sub Form_Load()With TabStrip1.Style = tabFlatButtons.Separators = TrueEnd WithEnd Sub
Data Report Designer: Error in Event Handling CodeIn the topic titled Data Report Events, there is an error in code thatshows how to handle asynchronous errors. For more information, searchonline, with Search titles only selected, for “Data Report Events” in theMSDN Library Visual Studio 6.0 documentation.
The code is found under the heading “Error Events’ for Asynchronous Events.”The code omits a “Select Case ErrObj.ErrorNumber” statement. The correctedcode is:

Private Sub DataReport_Error(ByVal JobType As _MSDataReportLib.AsyncTypeConstants, ByVal Cookie As Long, _ByVal ErrObj As MSDataReportLib.RptError, ShowError As Boolean)Select Case ErrObj.ErrorNumberCase rptErrPrinterInfo ‘ 8555MsgBox “A printing error has occurred. ” & _”You may not have a Printer installed.”ShowError = FalseExit SubCase Else ‘ handle other cases here.ShowError = TrueEnd SelectEnd Sub
RichTextBox Control: SelPrint Method Has New ArgumentThe SelPrint method now features a second, optional argument. The syntaxand part descriptions are shown below:
Syntax

object.SelPrint(lHDC As Long, [vStartDoc])
The SelPrint method syntax has these parts:

PartDescription—————————————————–objectAn object expression that evaluates to aRichTextbox control.lHDCLong. The device context of the device youplan to use to print the contents of thecontrol.vStartDocBoolean. Specifies the behavior of thecontrol regarding startdoc and enddoc printercontrol operations, as shown in settings.
SettingsThe settings for vStartDoc are:

ConstantValueDescription—————————————————————True-1(Default) The control retains itsoriginal behavior and sends startdocand enddoc commands to the printer.False0The control doesn’t send startdoc andenddoc commands, but sends onlystartpage and endpage commands to theprinter.
Remarks:
The argument was added to remedy situations when printers do not print withthe default behavior. When the SelPrint method is invoked, both VisualBasic and the RichTextBox control send startdoc and enddoc commands to theprinter resulting in a nested pair of startdoc/enddoc commands. Someprinters respond only to the first pair of commands and thereby becomedisabled when the RichTextbox control sends the second pair. In that case,setting the vStartDoc argument to False prevents the second pair ofcommands from being sent.
Visual Basic 5 Version of MSChart Control Available in Tools DirectoryFor pre-release users of Visual Basic only:
A Visual Basic 5.0x version of the MSChart control is now included withVisual Basic. If you need a Visual Basic 5 version of the Chart control,and you have installed the pre-release version of the MSChart control,please overwrite the pre-release version with the version contained in theTools directory of the Visual Basic CD.
Toolbar Control: Style Property Settings ChangedThe Style property settings for the Toolbar control have been changed. Thehelp topic for the property lists tbrTransparent and tbrRight as possiblesettings, however these are not implemented in the current version. Theactual possible settings and descriptions are shown below:

ConstantValueDescription————————————————————–tbrStandard0(Default) Standard toolbar.tbrFlat1Flat. The borders of a buttondynamically appear when the cursorhovers over the button.
Visual Basic Run-Time Error 720: Attempting to Add Anything Except a
Control to Controls Collection Causes Run-Time ErrorAttempting to add an object that is not a control to the Controlscollection causes run-time error 720. You can only add Visual Basicintrinsic controls or ActiveX controls to the collection.To reproduce:
Create a new Standard Exe. Form1 is created by default.Add the following code:

Private Sub Form_Load ()Controls.Add “Excel.Application”, “MyExcelApp”)End Sub Run the exe.Result: You get an error (720): Invalid class string.
Hierarchical FlexGrid Control: Correcting Errors Binding a Recordset to the
HFlexGridIf you receive the following error when trying to bind the HierarchicalFlexGrid to an ADO Recordset object, “DataSource settings may beincorrect”, try changing some of the behavioral properties associated withthe ADO Recordset Object or Command. For example, change the CursorLocationproperty to adUseNone or adUseClient.
Hierarchical FlexGrid Control: How to Change the Font of Individual BandsSince the same font object is used for the entire grid object, you mustcreate a new font object to change the fonts of individual bands, ratherthan changing the font directly.
For example, this way will not change the font for the individual band:

MSHFlexGrid1.FontBand(1).Name = “Arial”
Since you are directly modifying the font object, this will change thefonts in all of the bands to Arial.
To change an individual band, first create a new Font object, then assignthat Font object to the FontBand property:

Dim ft As New StdFontft.Name = “Arial”Set MSHFlexGrid1.FontBand(1) = ft
This will change just the band’s font to Arial.
Hierarchical FlexGrid Control: Avoiding the display of duplicate headersBy default, the Hierarchical FlexGrid control uses the first FixedRow inthe Hierarchical FlexGrid as a set of headers (which means it displays thenames of the fields bound to each column in this row). Since, by default,the HFlexGrid control displays one FixedRow, if you enable the display ofheaders on Band 0, it will appear as though the header is being duplicatedtwice. To avoid this, set the FixedRow property to 0, or clear out the textvalues in the first FixedRow using code.
ADO Data Control: FetchProgress and FetchComplete Events Not ImplementedAlthough the reference topic for the ADO Data Control includes links to theFetchProgress and FetchComplete events, the events are not implemented forthe control.
DataGrid: SizeMode and Size Properties Do Not Accept Value of 2
(dbgNumberOfColumns)The reference topics for the Split object’s SizeMode and Size propertiesrefer to a non-existent property value of 2 (dbgNumberOfColumns). Pleaseignore this value.
Controls: ImageList Control on Page DesignerWhen using the ImageList control on a DHTML Page designer, images cannot beadded at design time. If you try to use the following code in an uncompiled.dll project, you will get the run-time error: -2147418113 (8000ffff),”Method ‘Add’ of object images failed”.

Private Sub DHTMLPage_Load()ImageList1.ListImages.Add , , LoadPicture(“C:\Winnt\winnt.bmp”)End Sub
However, the code will work when the .dll project is compiled.
MSComm Control: EOFEnable Property Doesn’t Stop Data InputThe EOFEnable property determines if the OnComm event occurs when an EOFcharacter is detected. Contrary to the documentation for the property,however, input does not stop.
Treeview Control: Node Object’s Visible Property is Read-OnlyThe Visible property of the Treeview control’s Node object is a read-onlyproperty. If the node is not visible, you can use the EnsureVisible methodto make it visible, as shown in the example:

Private Sub Command1_Click()If Not TreeView1.Nodes(10).Visible ThenTreeView1.Nodes(10).EnsureVisibleEnd IfEnd Sub
SysInfo Control: Constants Not SupportedThe reference topics for the following events have lists of constants thatidentify devices and device data.:
DeviceArrival EventDeviceOtherEvent EventDeviceQueryRemove EventDeviceQueryRemoveFailed EventDeviceRemoveComplete EventDeviceRemovePending EventContrary to the documentation, however, these constants are not supportedby the events or the SysInfo control. The values associated with theconstants listed in the help topics are valid, but the constant names arenot.
User Control: Binary Persistence of PropertyBag Data Causes Page Designer
to FailThe PropertyBag saves data in binary format. Due to a known problem withbinary persistence and the DHTML page designer, however, such data causesthe page designer and Visual Basic to fail. See Page Designer: BinaryPersistence Issue for more information.