WindowLevelActionSample Example for Visual Basic
LEADRasterContainerViewer.EnableMethodErrors = True
' Activate Window level action if the action is not activated
If LEADRasterContainerViewer.WindowLevelAction.Use = False Then
LEADRasterContainerViewer.WindowLevelAction.ActivateAction True, 0
End If
' Select left mouse button to control window level parameters.
LEADRasterContainerViewer.WindowLevelAction.SetMouseButtonAction CONVIEW_MOUSE_BUTTON_LEFT, CONVIEW_ACTION_ALLCELLS
' Select left, right, up, and down keys to control window level parameters.
LEADRasterContainerViewer.WindowLevelAction.Modifier = CONVIEW_KEY_CTRL
LEADRasterContainerViewer.WindowLevelAction.Key = vbKeyDown
LEADRasterContainerViewer.WindowLevelAction.SetKeyboardAction CONVIEW_MOUSEMOVE_DOWN
LEADRasterContainerViewer.WindowLevelAction.Key = vbKeyUp
LEADRasterContainerViewer.WindowLevelAction.SetKeyboardAction CONVIEW_MOUSEMOVE_UP
LEADRasterContainerViewer.WindowLevelAction.Key = vbKeyLeft
LEADRasterContainerViewer.WindowLevelAction.SetKeyboardAction CONVIEW_MOUSEMOVE_LEFT
LEADRasterContainerViewer.WindowLevelAction.Key = vbKeyRight
LEADRasterContainerViewer.WindowLevelAction.SetKeyboardAction CONVIEW_MOUSEMOVE_RIGHT
' Select Window level cursor.
LEADRasterContainerViewer.WindowLevelAction.Cursor = LoadPicture("c:\vb\icons\arrows\cross.cur")
' Specify Window level parameters.
LEADRasterContainerViewer.WindowLevelAction.Change = 100
LEADRasterContainerViewer.WindowLevelAction.CircularMouseMove = True
LEADRasterContainerViewer.WindowLevelAction.StartColor = RGB(0, 0, 0)
LEADRasterContainerViewer.WindowLevelAction.EndColor = RGB(255, 255, 255)
' Set Window level parameters.
LEADRasterContainerViewer.WindowLevelAction.SetAction 0, 0, CONVIEW_ACTIONLEVEL_CONTAINER