FIX: Masked Edit Control Replaces Input if PromptChar Changed (150188)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q150188 SYMPTOMS
Any 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.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Basic
6.0.
WORKAROUND
Store 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
Modification Type: | Minor | Last Reviewed: | 7/16/2004 |
---|
Keywords: | kbbug kbfix KB150188 |
---|
|