GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / RegionMovedByUser Event
Example





In This Topic
RegionMovedByUser Event (GdViewer)
In This Topic
This event is raised when a highlighted region has been moved by a user using the mouse.

Please check the corresponded GdViewer.RegionMovedByUserEventHandler for given parameters.

Highlighted regions for currently displayed document are identified and created when searching text, for example using the SearchText(String,Int32,Boolean) method or the second similar overloaded method as well. You can also define highlighted regions directly using AddRegion(String,Int32,Int32,Int32,Int32,ForegroundMixMode,Int32) or AddRegionInches(String,Single,Single,Single,Single,ForegroundMixMode,Int32) methods.

Syntax
'Declaration
 
Public Event RegionMovedByUser As GdViewer.RegionMovedByUserEventHandler
public event GdViewer.RegionMovedByUserEventHandler RegionMovedByUser
public event RegionMovedByUser: GdViewer.RegionMovedByUserEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.RegionMovedByUserEventHandler* RegionMovedByUser
public:
event GdViewer.RegionMovedByUserEventHandler^ RegionMovedByUser
Remarks
Be aware that the RegionsAreEditable property needs to be turned on to enable region editing.
Example
How to add this event to your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.RegionMovedByUser, AddressOf GdViewer1_RegionMovedByUser
            
'Define the event.
Sub GdViewer1_RegionMovedByUser(ByVal RegionID As Integer) Handles GdViewer1.RegionMovedByUser
    'Do your stuff here.
End Sub
//We assume that the GdViewer1 control has been properly integrated.
            
//Add the event.
GdViewer1.RegionMovedByUser += GdViewer1_RegionMovedByUser;
            
//Define the event.
void GdViewer1_RegionMovedByUser(int RegionID)
{
    //Do your stuff here.
}
See Also