Maximum Length of Name Property Depends on Events Supported
ID: Q96151
|
The information in this article applies to:
-
Microsoft Visual Basic Standard and Professional Editions for Windows, versions 2.0, 3.0
-
Microsoft Visual Basic programming system for Windows, version 1.0
SUMMARY
The maximum length of the Name (CtlName in version 1.0) property for
controls varies from control to control depending on the character length
of its longest event name. Event procedures names are limited to a length
of 40 characters including the control's Name property, the underscore, and
the event name. Therefore, the longer the event name, the shorter the Name
property can be.
In Visual Basic versions 2.0 and 3.0, the Label, Picture Box, and Text Box
controls add support for the LinkNotify event, which is one character
longer than any event supported in version 1.0 for these controls. The
maximum length of the Name property for these controls is therefore one
character fewer in versions 2.0 and 3.0. A table showing the maximum length
of the Name property for all of the standard controls in Visual Basic
versions 2.0 and 3.0 is listed below.
MORE INFORMATION
The Name property of forms are not dependent on the events supported
because the property is not used in the name of form event procedures.
Event procedures for forms all begin with Form and therefore can be up to
the 40-character maximum in length.
Maximum length of Name properties for Version 2.0 and 3.0 controls
Control Name Length Limit
Check Box 30
Combo Box 30
Command Button 30
Directory List Box 30
Drive List Box 30
File List Box 26
Frame 31
Grid 27
Image 30
Label 29
Line 39
List Box 30
Menu 34
OLE Client 30
Option Button 30
Picture Box 25
Scroll Bars 30
Shape 39
Text Box 29
Timer 34
Additional query words:
2.00 3.00
Keywords :
Version : WINDOWS:1.0,2.0,3.0
Platform : WINDOWS
Issue type :