0

The purpose of DocumentView control is to display images. From a C# Form, this DocumentView control is added. This DocumentView Control has a menu item where we can select document number from a dropdown so that it changes the image by document number.

I am able to zoom in a particular area in the image to zoom it a little bigger and fill the screen. Now when I change from document 1 to 2 or any other number, I would like to retain the same zoom state.

Why?

Because productivity increases when working with noting down like Account Number from the each of the images by selecting document number again and again and zooming in again and again. Here I am reducing once step of zooming in to the same state as documents are similar in nature.

I tried -> MouseUp, MouseMove, MouseDown - Not firing when zooming in by drawing a rectangle
    -> DragEnter, DragDrop, DragLeave - Not firing when zooming in by drawing a rectangle
    -> KeyUp, KeyPress, KeyDown       - Not firing when zooming in by drawing a rectangle
    -> Paint                          - Not firing when zooming in by drawing a rectangle

I want to capture the coordinates of X & Y of the first point and X & Y of the leaving point in the image. Once I get this, I can easily set that values like this in PageChanged event.

docView.ZoomToRectangle(rect);

I would like to know from which event, I can capture the coordinates from the DocumentView control.

Below are the events attached.

DocumentView Events 1st Screenshot

DocumentView Events 2nd Screenshot

Searched the Internet but in vain. Any help would be greatly appreciated.

Ch.
  • 77
  • 1
  • 10
  • Anyone out there? – Ch. Feb 19 '20 at 12:53
  • Even just Click event is not firing on click of the image. Most of the events are disabled may be with some extra property. I am clueless. – Ch. Feb 20 '20 at 08:54
  • I have added event functions in the code-behind of the form for each of the item in the mentioned 2 screenshots of the question and for Dragging and Zooming with mouse does not fire any event at all. – Ch. Feb 20 '20 at 11:06
  • And on document number change in the Toolbar, it is firing `docView_PageComplete - 1 time,docView_CursorChanged - 2 times, docView_CanGrayscaleChanged - 1 time`. Should I need to check for any property here? – Ch. Feb 20 '20 at 11:32

0 Answers0