BUG: MaskedEdit MaxLength Reset to 64 When Mask=""Last reviewed: June 21, 1995Article ID: Q99873 |
The information in this article applies to:
- Professional Edition of Microsoft Visual Basic for Windows, versions 2.0 and 3.0
SYMPTOMSWhen the Mask property of the MaskedEdit custom control is set to two quotation marks (""), the MaxLength property is incorrectly reset to 64. However, the control continues to correctly limit input based on the original MaxLength setting, and you can change the value of MaxLength to establish a different maximum text limit for the control.
WORKAROUNDTo work around the problem, store the MaxLength property before setting the Mask property of the MasedEdit custom control. Then reset the MaxLength setting after setting the Mask property. For example, replace the code shown in the Command2_Click event procedure in step 3 of the More Information section below with this code:
Sub Command2_Click () Dim ml As Integer 'Store the current MaxLength property value ml = maskededit1.MaxLength maskededit1.Mask = "" maskededit1.Text = "" 'Restore the MaxLength property value since 'it has incorrectly been reset to 64 maskededit1.MaxLength = ml End Sub STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIf you set the mask property to "" at run time the MaxLength property is incorrectly set to 64, but the amount of text you can enter is still limited by the original MaxLength setting.
Steps to Reproduce Problem
|
Additional reference words: buglist2.00 buglist3.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |