开发者

MouseWheel handler doesn't handle MouseEvent with my .NET 2 form

I'd like to be an early adopter of using the mouse wheel to scroll my document and although the Forms designer doesn't publish the onMouseWheel property I have configured the handler programmatically in my ctor just after InitializeComponent();- 'cos I'm not so bold as to mess with that.

Form1() {
    InitializeComponent();
    this->MouseWheel += gcnew MouseEventHa开发者_运维问答ndler(this, &Form1::Form1_MouseWheel);
    //stuff
}

I'm trapping there okay but I can't trap in the handler itself. Anyone else get this problem? I'm using a Synaptics touchpad and .NET 2.0 on VS2008 (for backwards compatibility). The cursor changes to the rolling wheen but no further action occurs on screen.

Answers in C# are equally appreciated. Thanks.


Would it be bad form to add a belated comment to Mouse Wheel Event (C#) ? There lies my answer, although in this case it was the textbos which had taken the focus from the Form and captured its mousewheel event.

I suppose I shouldn't have asked the original question, maybe it will help others not have to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜