Scrollbar "flashes" when it has the focus?

R

Robin Tucker

Hiya,


I'm giving my vertical scrollbar the focus so it can handle mousewheel
events. When I give it the focus with ScrollBar.Focus(), it starts flashing
(at least the drag bar does). Is there any way to stop this from happening?
Its quite distracting.


Thanks.



Robin
 
J

Jeff Johnson [MVP: VB]

I'm giving my vertical scrollbar the focus so it can handle mousewheel
events. When I give it the focus with ScrollBar.Focus(), it starts flashing
(at least the drag bar does). Is there any way to stop this from happening?
Its quite distracting.

That's the way it's made to work and why it's recommended that you never
give a scroll bar focus. I believe you can call the HideCaret() API function
to stop the flashing. However, I would look for a different solution that
doesn't involve giving focus to the scroll bar.
 
R

Robin Tucker

Ahh. Well the problem is I've made a custom Thumnail list view using a
panel (I'm drawing my own list view items) in order to get around various
limitations in the other list view controls. Panels can't have the focus
and so cannot get mousewheel messages, scrollbars can though. Perhaps I
should produce a hack with an invisible control of some kind I can set the
focus to in order to catch these mouse messages??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top