C# ListView mouse wheel scroll without focus

前端 未结 2 479
别跟我提以往
别跟我提以往 2021-01-11 11:39

I\'m making a WinForms app with a ListView set to detail so that several columns can be displayed.

I\'d like for this list to scroll when the mouse is over the contr

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 12:05

    You'll normally only get mouse/keyboard events to a window or control when it has focus. If you want to see them without focus then you're going to have to put in place a lower-level hook.

    Here is an example low level mouse hook

提交回复
热议问题