SetCurrentPageHandler

I'm attempting to use SetCurrentPageHandler to update the textbox for the page number being viewed on my form, but my textbox is not being updated as I scroll through the pages of my PDF file.

I've been using the PDFView sample as a guide and have added what I believe is the relevant code. I modeled my textbox after the one that is being used in the sample, and I am able to retrieve the total number of pages for the PDF file, as well as setting the correct first page number.

My question is, what are the required pieces of code to get this working? For example, I noticed that OnActivated gets fired when a file is loaded into the PDF control in the example, but this does not fire in my code.

Thank you!

I had the right code, and after moving some of it around (to the right place), got the desired result.