
combo box behavior Win2000 vs Win98
It's not that uncommon for MS to make minor changes to controls in new
versions of Windows. Since most of the intrinsic controls in VB are derived
from controls in Windows, any changes MS made will also be "passed" along to
VB's intrinsic controls. It's therefore very possible that
behavior/functionality/features of a control may differ depending on the
version of Windows that the application is run under.
One such example that I can think of is a Textbox, which is derived from
Windows' Edit control. VB6's documentation states for the Alignment
property: "The MultiLine property in a Textbox control must be set to True
for the Alignment property to work correctly. If the MultiLine property
setting of a TextBox control is False, the Alignment property is ignored."
This statement is true....but only under Win95 and WinNT. This is because
the Edit control in those versions of Windows require the ES_MULTILINE style
for any alignment other than left. As of Win98, this "restriction" of the
Edit control was removed. This change in the Edit control carries over to
VB's TextBox. Incidently, this difference is documented in the Platform SDK
(look up the styles for an Edit control -- ES_CENTER, ES_RIGHT, ES_LEFT.
All the Alignment property does is set one of these styles when the Textbox
is created).
I can't say that I've ever noticed the difference in behavior you're
describing for a combobox, though. But that's probably because I just never
paid much attention to it. As far as rectifying it? You shouldn't even
attempt to do so. The user is accustomed to the standard behavior of the
control for whatever version of Windows he/she is using. Your combobox
shouldn't behave any differently than the comboboxes of every other app.
Mike
Quote:
> VB6.0 (Enterprise) SP5
> I have found that the behavior of the standard combo box
> differs depending which OS the vb project .exe is running
> on.
> The difference can be seen as follows:
> if the full text shown in a combo box is not completely
> highlighted when the control loses focus it blanks all the
> text if the desktop is Win98.
> However, if the desktop is Win2000 the same combo box in
> the same .exe will function correctly, leaving the text as
> typed in the box.
> Why should the combo box control functionality vary
> depending on the Windows OS version, and how can this be
> rectified?