Event to know when an area has been selected

Discussions about machine vision support in GdPicture.
Post Reply
rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Event to know when an area has been selected

Post by rgoodson40 » Thu Feb 09, 2012 9:35 pm

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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Event to know when an area has been selected

Post by Loïc » Thu Feb 09, 2012 9:47 pm

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

rgoodson40
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Event to know when an area has been selected

Post by rgoodson40 » Fri Feb 10, 2012 12:30 am

Works great. Thank you again for provided such easy solutions.

Reagan

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest