Article ID: 170162 - Last Review: May 13, 2003 - Revision: 3.0 INFO: VB 6.0 Readme Part 3: Control IssuesThis article was previously published under Q170162 On This PageSUMMARY
The information below includes the documentation and workarounds for Visual
Basic 6.0. This information can also be found in the README.htm file that
ships with Visual Basic 6.0 on the Visual Basic 6.0 CD-ROM. Please see the
REFERENCES section of this article for a list of the Microsoft Knowledge
Base 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 MORE INFORMATIONLightweight Controls Must Be BorderlessWhen creating a lightweight User control by setting the Windowless property to True, the BorderStyle property is invalidated. By definition a lightweight control has no border.If you first set the BorderStyle property to anything other than 0 - None and subsequently change the Windowless property to True, you will receive an error message "Windowless UserControls only support BorderStyle = None". Run Time Error 711: Compiled .Exe Doesn't Contain Information About Unreferenced Control Causing Controls.Add to Fail Problem:
Remarks By default, ActiveX controls that are referenced but not placed on any type of form at design time are not available for Controls.Add at runtime or in an executable. Hierarchical FlexGrid Control: ColWordWrapOption, ColWordWrapOptionBand, ColWordWrapOptionFixed, ColWordWrapOptionHeader PropertiesThe following properties are part of the Hierarchical FlexGrid control's feature set but are not documented in the control's help:ColWordWrapOption, ColWordWrapOptionBand, ColWordWrapOptionFixed, ColWordWrapOptionHeader. Descriptions and syntaxes for these properties are found below. Settings for all properties are the same, and can be found at the bottom of the topic: ColWordWrapOption Property Returns or sets a value that specifies how text is wrapped in a specified column. Syntax The ColWordWrapOption property syntax has these parts:
Part Description
----------------------------------------------------
object An object expression that evaluates to a Hierarchical
FlexGrid control.
Index Long. The number of the column to get or set word wrap
on. The value must be in the range of -1 to Cols - 1.
Setting this value to -1 selects all columns.
integer A 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 specified band. Syntax The ColWordWrapOption property syntax has these parts:
Part Description
----------------------------------------------------
object An object expression that evaluates to a Hierarchical
FlexGrid control.
BandNumber Long. The number of the band to get or set word wrap on.
The value must be in the range of 0 to Bands - 1.
BandColIndex Long. The number of the column to get or set word wrap
on. This optional parameter defaults to -1, indicating
all columns in the band. Valid values are -1 to Cols -1.
integer A 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 specified band. Syntax The ColWordWrapOption property syntax has these parts:
Part Description
---------------------------------------------------------------
object An object expression that evaluates to a
Hierarchical FlexGrid control.
BandNumber Long. The number of the band to get or set
word wrap on. The value must be in the range
of 0 to Bands - 1.
BandColIndex Long. The number of the column to get or set
word wrap on. This optional parameter
defaults to -1, indicating all columns in the
band. Valid values are -1 to Cols -1.
integer A 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 specified fixed column. Syntax The ColWordWrapOptionFixed property syntax has these parts:
Part Description
----------------------------------------------------
object An object expression that evaluates to a Hierarchical
FlexGrid control.
index Long. The number of the column to get/set word wrap on.
This optional parameter defaults to -1. Valid values are
-1 to Cols -1.
Integer A 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 specified fixed column. Syntax
Part Description
------------------------------------------------------------------
object An object expression that evaluates to a
Hierarchical FlexGrid control.
index Long. The number of the column to get/set
word wrap on. This optional parameter
defaults to -1. Valid values are -1 to Cols
-1.
integer A numeric expression that determines how
words will wrap, as shown in settings.
ColWordWrapOptionHeader Property Returns or sets a value that specifies how text is wrapped in column headers. Syntax
Part Description
--------------------------------------------------------------------
object An object expression that evaluates to a
Hierarchical FlexGrid control.
BandNumber Long. The number of the band to get/set word
wrap on. The value must be in the range of 0
to Bands - 1.
BandColIndex Long. The number of the column to get/set
word wrap on. This optional parameter
defaults to -1 indicating all column headers
in the band. Valid values are -1 to Cols -1.
integer A numeric expression that determines how
words will wrap, as shown in settings.
Settings The settings for integer are:
Constant Value Description
------------------------------------------------------------
flexSingleLine 0 (Default) Displays text on a
single line only.
flexWordBreak 1 The lines are automatically
broken between words.
flexWordEllipsis 2 Truncates text that does not
fit in the rectangle and adds
ellipsis.
flexWordBreakEllip 3 Breaks words between lines and
sis adds ellipsis if text doesn't
fit in the rectangle.
Hierarchical FlexGrid Control: ColIsVisible and RowIsVisible Properties are Read OnlyThe ColIsVisible and RowIsVisible properties are read-only properties and cannot be set programmatically. You can use the properties to test whether a column or row is visible, and hide the column or row, if appropriate, as show below: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 settings are show in the table below:
Constant Value Description
---------------------------------------------------------------
flexGridDashes 4 Dashed Lines. Sets line style
between cells to dashed lines.
flexGridDots 5 Dotted Lines. Sets line style
between 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 aware that public properties of the control will be set only on the current control (the "live" control with the focus). For example, if you expose the Font property of a user control, at run time, resetting that property (as shown in the example code below) will only affect the current control in the DataRepeater control. The font of repeated controls will not be affected.The corresponding code in the user control would resemble the following: TabStrip Control: Separators show only when the Style property = TabFlatButtonsSeparators will only appear on a TabStrip control when the Style property is set to TabFlatButtons. An example is shown below:Data Report Designer: Error in Event Handling CodeIn the topic titled Data Report Events, there is an error in code that shows how to handle asynchronous errors. For more information, search online, with Search titles only selected, for "Data Report Events" in the MSDN 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 corrected code is: RichTextBox Control: SelPrint Method Has New ArgumentThe SelPrint method now features a second, optional argument. The syntax and part descriptions are shown below:Syntax The SelPrint method syntax has these parts:
Part Description
-----------------------------------------------------
object An object expression that evaluates to a
RichTextbox control.
lHDC Long. The device context of the device you
plan to use to print the contents of the
control.
vStartDoc Boolean. Specifies the behavior of the
control regarding startdoc and enddoc printer
control operations, as shown in settings.
SettingsThe settings for vStartDoc are:
Constant Value Description
---------------------------------------------------------------
True -1 (Default) The control retains its
original behavior and sends startdoc
and enddoc commands to the printer.
False 0 The control doesn't send startdoc and
enddoc commands, but sends only
startpage and endpage commands to the
printer.
Remarks: The argument was added to remedy situations when printers do not print with the default behavior. When the SelPrint method is invoked, both Visual Basic and the RichTextBox control send startdoc and enddoc commands to the printer resulting in a nested pair of startdoc/enddoc commands. Some printers respond only to the first pair of commands and thereby become disabled when the RichTextbox control sends the second pair. In that case, setting the vStartDoc argument to False prevents the second pair of commands 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 with Visual 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 the Tools directory of the Visual Basic CD. Toolbar Control: Style Property Settings ChangedThe Style property settings for the Toolbar control have been changed. The help topic for the property lists tbrTransparent and tbrRight as possible settings, however these are not implemented in the current version. The actual possible settings and descriptions are shown below:
Constant Value Description
--------------------------------------------------------------
tbrStandard 0 (Default) Standard toolbar.
tbrFlat 1 Flat. The borders of a button
dynamically appear when the cursor
hovers 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 Controls collection causes run-time error 720. You can only add Visual Basic intrinsic controls or ActiveX controls to the collection. To reproduce:
Hierarchical FlexGrid Control: Correcting Errors Binding a Recordset to the HFlexGridIf you receive the following error when trying to bind the Hierarchical FlexGrid to an ADO Recordset object, "DataSource settings may be incorrect", try changing some of the behavioral properties associated with the ADO Recordset Object or Command. For example, change the CursorLocation property 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 must create a new font object to change the fonts of individual bands, rather than changing the font directly.For example, this way will not change the font for the individual band: Since you are directly modifying the font object, this will change the fonts in all of the bands to Arial. To change an individual band, first create a new Font object, then assign that Font object to the FontBand property: 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 in the Hierarchical FlexGrid as a set of headers (which means it displays the names of the fields bound to each column in this row). Since, by default, the HFlexGrid control displays one FixedRow, if you enable the display of headers on Band 0, it will appear as though the header is being duplicated twice. To avoid this, set the FixedRow property to 0, or clear out the text values 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 the FetchProgress and FetchComplete events, the events are not implemented for the control.DataGrid: SizeMode and Size Properties Do Not Accept Value of 2 (dbgNumberOfColumns)The reference topics for the Split object's SizeMode and Size properties refer to a non-existent property value of 2 (dbgNumberOfColumns). Please ignore this value.Controls: ImageList Control on Page DesignerWhen using the ImageList control on a DHTML Page designer, images cannot be added 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".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 EOF character 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-only property. If the node is not visible, you can use the EnsureVisible method to make it visible, as shown in the example:SysInfo Control: Constants Not SupportedThe reference topics for the following events have lists of constants that identify devices and device data.:
User Control: Binary Persistence of PropertyBag Data Causes Page Designer to FailThe PropertyBag saves data in binary format. Due to a known problem with binary persistence and the DHTML page designer, however, such data causes the page designer and Visual Basic to fail. See Page Designer: Binary Persistence Issue for more information.REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
170164
(http://support.microsoft.com/kb/170164/EN-US/
)
: INFO: VB 6.0 Readme Part 1: Important Issues - Read First!
170163 (http://support.microsoft.com/kb/170163/EN-US/ ) : INFO: VB 6.0 Readme Part 2: Data Access/Databinding Issues 170161 (http://support.microsoft.com/kb/170161/EN-US/ ) : INFO: VB 6.0 Readme Part 4: Language Issues 170160 (http://support.microsoft.com/kb/170160/EN-US/ ) : INFO: VB 6.0 Readme Part 5: Samples Issues 190046 (http://support.microsoft.com/kb/190046/EN-US/ ) : INFO: VB 6.0 Readme Part 6: Wizard Issues 170158 (http://support.microsoft.com/kb/170158/EN-US/ ) : INFO: VB 6.0 Readme Part 7: Error Message Issues 189539 (http://support.microsoft.com/kb/189539/EN-US/ ) : INFO: VB 6.0 Readme Part 8: WebClass Designer Issues 190249 (http://support.microsoft.com/kb/190249/EN-US/ ) : INFO: VB 6.0 Readme Part 9: DHTML Page Designer Issues 170154 (http://support.microsoft.com/kb/170154/EN-US/ ) : INFO: VB 6.0 Readme Part 10: Extensibility Issues 170157 (http://support.microsoft.com/kb/170157/EN-US/ ) : INFO: VB 6.0 Readme Part 11: Miscellaneous Issues 170156 (http://support.microsoft.com/kb/170156/EN-US/ ) : INFO: VB 6.0 Readme Part 12: Transaction Server (MTS) Issues 191792 (http://support.microsoft.com/kb/191792/EN-US/ ) : INFO: VB 6.0 Readme Part 13: Dictionary Object 191791 (http://support.microsoft.com/kb/191791/EN-US/ ) : INFO: VB 6.0 Readme Part 14: Visual Component Manager 191790 (http://support.microsoft.com/kb/191790/EN-US/ ) : INFO: VB 6.0 Readme Part 15: Application Performance Explorer | Article Translations
|
Back to the top
