There's the LBS_NOSEL window style for list boxes. It seems to be
exactly what you're looking for. However, setting this style after the
control has been created, probably won't have any effect. But you should
give it a try.
Timo

Signature
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
> Dear all
> In my VB6 app I have a Listbox that is filled with various entries.
[quoted text clipped - 6 lines]
> Does anyone know is there a way to have a disabled Listbox where vertical
> scrolling works?
Well....any action that occurs by a user selecting an item is done by your
code most likely in the ListBox's Click event. So what if the user can
still select an item....it's what's done by your code as a result of that
action that matters. So...in those "certain situations", set a flag and
check the value of that flag in the ListBox's Click event, and if
appropriate don't have your code do anything.
Other than that, use a different control. Afterall, a ListBox *is* intended
for a user to select something from a list.

Signature
Mike
Rick Raisley - 26 Jun 2009 16:32 GMT
Or, just add code in the Click event that un-selects all rows. The user will
be able to select them, but as soon as the mouse is released, the
highlighted rows will unhighlight.

Signature
Regards,
Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
>> Dear all
>> In my VB6 app I have a Listbox that is filled with various entries.
[quoted text clipped - 16 lines]
> Other than that, use a different control. Afterall, a ListBox *is*
> intended for a user to select something from a list.
Many Thanks for your answers and sorry for my late reply.
The reason why I like to have a disabled listbox is:
In my application the user can choose one of several items from the listbox.
At this time the listbox is enabled.
At another stage the user is able to add further items to this listbox by
pressing a button(which opens a textbox where he can type in the new item).
While the user can enter a new item I like to show him all existing items
via a disabled listbox.
I like to have a listbox here as well to maintain the same user interface
instead of confusing the user with another control.
I thought that there is maybe an "easy way" to disable a listbox via api
call but leave the vert. scrollbar enabled.
At the moment I follow Ricks suggestion to leave the listbox enabled and
deselect all items in the click event.
This seems to be a good compromise.
If anyone can suggest any other ideas then please let me know
Best regards
Peter