BUG: Unable to Edit LinkNotify Event If Control Has Long Name
ID: Q97027
|
The information in this article applies to:
-
Microsoft Visual Basic Standard and Professional Editions for Windows, version 2.0
-
Microsoft Visual Basic programming system for Windows, version 1.0
SYMPTOMS
Visual Basic version 2.0 does not allow you to edit the LinkNotify event
procedure of a Label, Picture Box, or Text Box control if the control
has a 30-character Name property.
CAUSE
The LinkNotify event, an event new in Visual Basic version 2.0, became
the longest (10 characters) event procedure name for Label, Picture Box,
and Text Box controls. In version 1.0, the longest event procedure for
these controls was nine characters long.
The maximum length of the Name property (CtlName property in Visual
Basic version 1.0) is directly related to the length of the control's
longest event procedure, so the maximum length of the Name property for
Label, Picture Box, and Text Box controls in Visual Basic version 2.0 is
one character less than it is in Visual Basic version 1.0.
Therefore, if you load a Visual Basic version 1.0 project into Visual
Basic version 2.0 and a Label, Picture Box, or Text Box control has a
30-character CtlName property, you won't be able to edit the LinkNotify
event in the Visual Basic environment until you reduce the length of the
Name property.
WORKAROUND
Reduce the length of the Name property by one or more characters.
STATUS
Microsoft has confirmed this to be a bug in both the Standard and
Professional Editions of Microsoft Visual Basic version 2.0 for Windows.
We are researching this problem and will post new information here in the
Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
The maximum length of event procedures names is limited to 40 characters
including the control name, the underscore, and the event name. The Name
property therefore has a maximum length that varies depending on the
events supported by the control.
Steps to Reproduce Problem
- Start Visual Basic version 1.0, or from the File menu, choose New
Project (ALT, F, N) if Visual Basic is already running. Form1 is created
by default.
- Add a Text box (Text1) to Form1.
- Set the CtlName property of Text1 to the following 30-character name:
Text56789012345678901234567890
- From the File menu, choose Save Project (ALT, F, V). Save the form and
project with their default names, Form1 and Project1.
- From the File menu, choose Exit to close Visual Basic version 1.0.
- Start Visual Basic version 2.0.
- From the File menu, choose Open Project (ALT, F, O) and select Project1.
Two dialog boxes will appear stating that Form1 and Project1 are saved
in an older format and will be saved in new format when you save the
project. Choose the OK button on both dialog boxes.
- From the View menu, choose Code (ALT, V, C) to open a code window for
Form1.
- From the Object List, select Text56789012345678901234567890.
- From the Procedures List, try to select LinkNotify.
At this point, the Visual Basic environment will not allow you to select
LinkNotify. It returns you to the previously displayed event procedure.
Additional query words:
buglist2.00 2.00
Keywords :
Version : WINDOWS:1.0,2.0
Platform : WINDOWS
Issue type :