SetFocus!



Clicking different CommandButtons on a VB6 Form adds the Captions of
the CommandButtons as items in a ListBox one below the other. For e.g.
when a user clicks the CommandButton "5", "5" gets added as the 1st
item in the ListBox. Next when the user clicks the CommandButton "2",
"2" gets added as the 2nd item in the ListBox below "5" so on & so
forth. I want that when an item gets added to the ListBox, that item
should get highlighted/selected. For e.g. when "5" gets added to the
ListBox, "5" should be highlighted/selected. Next when "2" gets added
to the ListBox (below "5"), "2" should be highlighted/selected. How do
I do this?

Thanks,

Arpan

.


Loading