仅滚动鼠标即可自动滚动列表框

问题描述:

是否有一种方法可以使滚轮工作而无需特别指定控件的焦点?因此,我可以将鼠标悬停在列表框上并滚动而不会失去对我正在使用的文本框的关注?

REALbasic为我自动执行了此操作,只是想知道如何在VB.NET中执行此操作.

Is there a way to have the scroll wheel work without specifically giving a control the focus? So i can just mouse over a listbox and scroll without loosing focus on the textbox i''m using?

REALbasic did it automatically for me, just wondering how to do it in VB.NET.

有鼠标进入和鼠标离开事件,以及鼠标移动.没有自动的方法可以执行所需的操作,但是您可以编写执行此操作的代码.您可能会发现移动列表可以使它具有焦点,您可能必须使它明确地将焦点返回到文本框.
There are mouse enter and mouse leave events, as well as mouse move. There''s no automatic way to do what you want, but you could write code that does it. You may find that moving the list gives it focus, you may have to make it return focus to the textbox, explicitly.