MouseWheel event subclass ViewCtrl

Hello,

I subclassed the PDFViewCtrl to develop some extra functionality.

Can you inform me how you would implement the zoom function when using
the mousewheel?

This would be a very handy feature.

Kind regards,

Tom

Tom,

I have found that PDFNet very powerful but often difficult to use. In the MyPDFView.cs there is a method that handles the mouse wheel (it may be commented out).
Find it and modify it to something similar below.

// Override built-in mouse wheel event handling?
protected override void OnMouseWheel(MouseEventArgs e)
{
      if (e.Delta > 0)
      {
           //GotoPreviousPage();
           this.SetZoom(this.GetZoom() / 1.1);
      }
      else if (e.Delta < 0)
      {
          //GotoNextPage();
          this.SetZoom(this.GetZoom() / .9);
      }

}

I hope this helps.
Troy

PS A few other tips I've found useful...

public void RefreshPage() //Clumsy workaround to a non-functional PDFCtrl.Refresh()
        {
            pdfCtrl1.SetZoom(pdfCtrl1.GetZoom() / 1.1);
            pdfCtrl1.SetPageViewMode(PDFViewCtrl.PageViewMode.e_fit_page);
        }

private ColorPt CreateColorPt(Color clr) //Converts standard colors to ColorPt
        {
            ColorPt clrPt = new ColorPt(clr.R / 255.0, clr.G / 255.0, clr.B / 255.0);
            return clrPt;
        }