OffsetActionSample Example for Visual Basic

    LEADRasterContainerViewer.EnableMethodErrors = True

    ' Activate offset action if the action is not activated
    If LEADRasterContainerViewer.OffsetAction.Use = False Then
       LEADRasterContainerViewer.OffsetAction.ActivateAction True, 0
    End If
    ' Select left mouse button to control window level parameters. 
    LEADRasterContainerViewer.OffsetAction.SetMouseButtonAction CONVIEW_MOUSE_BUTTON_LEFT, CONVIEW_ACTION_ACTIVEONLY Or CONVIEW_ACTION_REALTIME

    ' Select left, right, up, and down keys to control offset parameters. 
    LEADRasterContainerViewer.OffsetAction.Modifier = CONVIEW_KEY_SHIFT
    LEADRasterContainerViewer.OffsetAction.Key = vbKeyDown
    LEADRasterContainerViewer.OffsetAction.SetKeyboardAction CONVIEW_MOUSEMOVE_DOWN
    LEADRasterContainerViewer.OffsetAction.Key = vbKeyUp
    LEADRasterContainerViewer.OffsetAction.SetKeyboardAction CONVIEW_MOUSEMOVE_UP
    LEADRasterContainerViewer.OffsetAction.Key = vbKeyLeft
    LEADRasterContainerViewer.OffsetAction.SetKeyboardAction CONVIEW_MOUSEMOVE_LEFT
    LEADRasterContainerViewer.OffsetAction.Key = vbKeyRight
    LEADRasterContainerViewer.OffsetAction.SetKeyboardAction CONVIEW_MOUSEMOVE_RIGHT

    ' Select offset cursor. 
    
       LEADRasterContainerViewer.OffsetAction.Cursor = LoadPicture("c:\vb\icons\arrows\cross.cur")
   
    ' Specify offset parameters. 
    LEADRasterContainerViewer.OffsetAction.Change = 100
    LEADRasterContainerViewer.OffsetAction.CircularMouseMove = True
    
    ' Set offset parameters. 
    LEADRasterContainerViewer.OffsetAction.SetAction 0, CONVIEW_ACTIONLEVEL_CONTAINER