Microsoft KB Archive/174321: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 72: | Line 72: | ||
== CAUSE == | == CAUSE == | ||
When you set the Enabled property of the Masked EditBox control to False, the Backcolor of the control changes to the Windows Control Panel setting for | When you set the Enabled property of the Masked EditBox control to False, the Backcolor of the control changes to the Windows Control Panel setting for "3D Objects." This problem occurs under the following circumstances:<br /> | ||
<br /> | <br /> | ||
Line 104: | Line 104: | ||
<ol> | <ol> | ||
<li>Start a new project. Form1 is created by default.</li> | <li>Start a new project. Form1 is created by default.</li> | ||
<li>Add a reference to the | <li>Add a reference to the "Microsoft Masked Edit Control" (MSMASK32.OCX).</li> | ||
<li>Add a MaskEdBox, TextBox and CommandButton to Form1.</li> | <li>Add a MaskEdBox, TextBox and CommandButton to Form1.</li> | ||
<li><p>Add the following code to the Click event of Command1:</p> | <li><p>Add the following code to the Click event of Command1:</p> | ||
Line 112: | Line 112: | ||
<li>Press the F5 key to run the project. Click Command1.<br /> | <li>Press the F5 key to run the project. Click Command1.<br /> | ||
<br /> | <br /> | ||
'''RESULTS''': The BackColor of the MaskEdBox changes to the | '''RESULTS''': The BackColor of the MaskEdBox changes to the "3D Objects" color setting while the BackColor of the TextBox remains unchanged.</li></ol> | ||
Latest revision as of 11:07, 21 July 2020
Article ID: 174321
Article Last Modified on 2/24/2004
APPLIES TO
- Microsoft Visual Basic 5.0 Learning Edition, when used with:
- Microsoft Windows 95
- Microsoft Windows 98 Standard Edition
- Microsoft Visual Basic 5.0 Professional Edition, when used with:
- Microsoft Windows 95
- Microsoft Windows 98 Standard Edition
- Microsoft Visual Basic 5.0 Enterprise Edition, when used with:
- Microsoft Windows 95
- Microsoft Windows 98 Standard Edition
This article was previously published under Q174321
SYMPTOMS
When you set the Enabled property of the Masked EditBox control to False, the Backcolor of the control changes and cannot be changed to another color.
CAUSE
When you set the Enabled property of the Masked EditBox control to False, the Backcolor of the control changes to the Windows Control Panel setting for "3D Objects." This problem occurs under the following circumstances:
- You are using Visual Basic version 4.0. - or -
- You are using Visual Basic version 5.0 on Windows 95, Windows 98, or Windows Me.
RESOLUTION
To work around this problem, place the Masked Edit control inside a PictureBox control. Then, to disable the Masked Edit control, set the Enabled property of the PictureBox to False.
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.
MORE INFORMATION
Steps to Reproduce Behavior
- Start a new project. Form1 is created by default.
- Add a reference to the "Microsoft Masked Edit Control" (MSMASK32.OCX).
- Add a MaskEdBox, TextBox and CommandButton to Form1.
Add the following code to the Click event of Command1:
Text1.Enabled = False MaskEdBox1.Enabled = False
- Press the F5 key to run the project. Click Command1.
RESULTS: The BackColor of the MaskEdBox changes to the "3D Objects" color setting while the BackColor of the TextBox remains unchanged.
Additional query words: masked edit box editbox msmask32.ocx kbComp
Keywords: kbbug kbfix kbvbp600fix kbctrl KB174321