BUG: Masked Edit Control Replaces Input if PromptChar ChangedLast reviewed: October 11, 1996Article ID: Q150188 |
The information in this article applies to:
SYMPTOMSAny input characters inside the Masked Edit control when the PromptChar character is changed are converted to the new PromptChar in the 32-bit edition of Visual Basic, and are deleted in the 16-bit edition.
STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDStore the text inside the Masked Edit control before changing the PromptChar and restoring the saved text to the control after it has changed. Rather than change the PromptChar, call the following subroutine to modify it:
Public Sub ChangePromptChar(ByVal cNewChar As String) Dim strClip As String strClip = MaskEdBox1.ClipText MaskEdBox1.PromptChar = cNewChar MaskEdBox1.SelStart = 0 MaskEdBox1.SelText = strClip End Sub MORE INFORMATION
Steps to Reproduce Problem
Private Sub Form_Click() ChangePromptChar "o" End Sub |
Additional reference words: 4.00 vb4win vb4all
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |