ScaleActionSample Example for Visual Basic

   LEADRasterContainerViewer.EnableMethodErrors = True

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

   ' Select left, right, up, and down keys to control scale parameters. 
   LEADRasterContainerViewer.ScaleAction.Modifier = CONVIEW_KEY_ALT
   LEADRasterContainerViewer.ScaleAction.Key = vbKeyDown
   LEADRasterContainerViewer.ScaleAction.SetKeyboardAction CONVIEW_MOUSEMOVE_DOWN
   LEADRasterContainerViewer.ScaleAction.Key = vbKeyUp
   LEADRasterContainerViewer.ScaleAction.SetKeyboardAction CONVIEW_MOUSEMOVE_UP

   ' Select scale cursor. 

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