Page 1 of 1

Event to know when an area has been selected

Posted: Thu Feb 09, 2012 9:35 pm
by rgoodson40
Hello,

Is there an event that will trigger when a user finishes selecting an area of a document. I have tried the "RegionSelectedByUser" event but that doesn't seem to work. I want to be able to tell when a user has selected an area of a document so that I can OCR the selected area and then copy it that data to the clipboard. When I say "selected an area of the document", I mean when the mouse mode is set to "MouseModeAreaSelection" and they draw a rectangle on the document.

Thanks,
Reagan

Re: Event to know when an area has been selected

Posted: Thu Feb 09, 2012 9:47 pm
by Loïc
Hello!

Yes it is easy to do:

Code: Select all

Private Sub GdViewer1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GdViewer1.MouseUp
        If GdViewer1.IsRect() Then
            'Do your stuff here
        End If
End Sub
Hope this helps.

Cheers,

Loïc

Re: Event to know when an area has been selected

Posted: Fri Feb 10, 2012 12:30 am
by rgoodson40
Works great. Thank you again for provided such easy solutions.

Reagan