By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Scrollbar "flashes" when it has the focus?

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:cd*******************@news.demon.co.uk...
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.
Nov 20 '05 #2

P: n/a
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??

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...

"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:cd*******************@news.demon.co.uk...
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.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.