The Text property of the Masked Edit control does not work at run time in Visual Basic .NET or in Visual Basic 2005 (814321)
The information in this article applies to:
- Microsoft Visual Basic 2005
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
Beta Information This article discusses a Beta release of a Microsoft
product. The information in this article is provided as-is and is subject to
change without notice.
No formal product support is available from
Microsoft for this Beta product. For information about how to obtain support
for a Beta release, see the documentation that is included with the Beta
product files, or check the Web location from which you downloaded the release.
SYMPTOMSIn Visual Basic .NET or Visual Basic 2005, you cannot access the text that you
type in the Masked Edit control by using the Text property. The text that you assign to the Masked Edit control by
using the Text property is not visible on the control. However, you can access
the text by using the Text property if the text is assigned by using the Text property.CAUSEThe Text Property is a non-browsable property of the Masked Edit control.
The Masked Edit control is a Component Object Model (COM) control that you can
only access through a COM Interop Wrapper. The Text property does not read the text that you type in the Masked Edit
control, because the Text property is not hooked to the underlying OCX control. You cannot
access the Text property in Microsoft Visual C# .NET or in Microsoft Visual C# 2005.WORKAROUNDTo work around this problem, use the CtlText property instead of the Text property. The Masked Edit control uses the CtlText property to set the text that you type in the Masked Edit
control. For example, you can use AxMaskEdBox1.CtlText = "0123" instead
of AxMaskEdBox1.Text =
"0123".STATUS This
behavior is by design.
Modification Type: | Minor | Last Reviewed: | 10/3/2006 |
---|
Keywords: | kbvs2005applies kbvs2005swept kbprb kbWindowsForms kbEditCtrl kbCOMInterop kbControl KB814321 kbAudDeveloper |
---|
|