This is my first visual basic 5 project and it's for work not a school assignment. Any help is appreciated.

I'm displaying lines from a file in a listbox and I'm highlighting each line according to a timer. I don't want any user clicking in the listbox, but when I set list1.enabled = false, the text grays out.

How do I keep the text from graying and/or the user from clicking? I tried setting the list1.forecolor property, but that didn't work. Should I be using something besides a listbox to display the file contents?

I dont think it is possible to do that.
you could try using a combo box but they can still click.
i think the combo box will work best here just set the size of it so that they can only view them one at a time and they can scroll by click next to it.

Thanks for your response, 2thestart.

I'm already using a combo box to display the activities that the user can select.

Once the user selects an activity, the steps for that activity are read in from a text file and displayed in the list box. The steps are then highlighted line-by-line using a timer.

Step 1 for x amount of minutes
Step 2 for x amount of minutes
...etc

I need to display all the steps, so the user knows what coming.

The activity can last for hours, so I didn't want the user to be able to click in the list box and select a line. But if I disable the list box, the gray text doesn't look good.

What to do???

My guess is, but I have not tried it is to allow the mouse clicks but put nothing in subroutine that normally reponds to mouse clicks.

I would think that being able to click on it would be ok because if it goes to fast some how or they wanted to go back to look at something. O well i will look into it some more.

Hi WWillow,

Keep it Simple,

Place The ListBox On the Frame, And Disable the Frame , Enable the List Box, ur job will be done.

Regards
Veena

Veena,

Your solution works perfectly. Thanks so much for taking the time to reply.

And thanks to all for your suggestions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.