CAUSE
Visual Basic derives its TextBox control from a proprietary class called
"ThunderTextBox," which in turn is based on the "Edit" class provided by
the operating system. Because the operating system defines the "Edit"
class, some of the properties and functionality of a TextBox may change
depending upon the version of the operating system where the application is
executed. This is the case with the TextBox's Alignment property. In
earlier versions of Windows, changes to the "Alignment" property would not
take effect unless the "MultiLine" property of the TextBox was set to
"True." The latest versions of the Windows operating system no longer have
this limitation.
Any control from any development environment that is derived from the
"Edit" class will demonstrate the same change in behavior.
Versions of Windows that require the "MultiLine" property to be set to
"True" in order for the "Alignment" property to take effect include:
Windows 95 (regardless of service packs)
Windows NT 3.51 (regardless of service packs)
Windows NT 4.0
Windows NT 4.0 with Service Packs 1 or 2
Versions of Windows that do not have this requirement include:
Windows 98
Windows Me
Windows NT 4.0 with Service Pack 3 or higher
REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
189249 HOWTO: Determine Which 32-Bit Windows Version Is Being Used
111952 HOWTO: Right Justify/Center Text in Single-Line Text Control