Sets the handle for using custom cursors.
Visual Basic |
---|
Public Sub SetUseCustomCursorType( _ ByVal cursorType As NX_CursorType, _ ByVal Tool As NX_AnnotationTool, _ ByVal newVal As Long _ ) |
- cursorType
Value Description NX_Cursor_Creating The cursor when creating new elements. NX_Cursor_Moving The cursor when moving elements. NX_Cursor_Selecting The cursor when selecting elements. - Tool
Value Description NX_BlockHighlightTool (&H100C) - BlockHighlight tool. NX_ButtonTool (&H100A) - Button tool. NX_EllipseTool (&H1003) - Ellipse tool. NX_FreehandTool (&H1007) - Freehand Tool. NX_ImageTool (&H1009) - Image tool. NX_LineTool (&H1006) - Line Tool. NX_NoteTool (&H100D) - Note tool. NX_NoTool (&H0000) - Disables annotation. NX_PointerTool (&H1000) - Selection tool. NX_PolygonTool (&H1004) - Polygon Tool. NX_PolyLineTool (&H1005) - PolyLine Tool. NX_ProtractorTool Protractor NX_RectangleTool (&H1002) - Rectangle tool. NX_RulerTool (&H100B) - Ruler tool. NX_StampTool (&H1008) - Stamp tool. NX_TextTool (&H1001) - Text tool. - newVal
- The handle to the custom cursor used for the given operation and tool.
This method is for replacing the built-in cursors that are created by turning on SetUseCursorType.
Note: Make sure that the icon does not go out of scope, as the application controls ownership of the icon.
Using Custom Cursors (Visual Basic) | ![]() |
---|---|
'YouwillneedtoprototypetheLoadImagecall PrivateConstIMAGE_CURSOR=2 PrivateConstLR_LOADFROMFILE=&H10 PrivateDeclareFunctionLoadImageLib"user32"Alias"LoadImageA"(ByValhInstAsLong,ByVallpszAsString,ByValun1AsLong,ByValn1AsLong,ByValn2AsLong,ByValun2AsLong)AsLong PrivateSubSetMyCursors_Click() 'Ifyouwantlargeorsmallicons NotateXpress1.ToolbarLargeIcons=False 'Loadacustomcursorfromafile, 'ReplaceallthreetypesofcursorsfortheBlockHighlighttool. NotateXpress1.SetUseCustomCursorTypeNX_Cursor_Creating,NX_BlockHighlightTool,LoadImage(App.hInstance,"c:\\mycursors\\testcreate.cur",IMAGE_CURSOR,0,0,LR_LOADFROMFILE) NotateXpress1.SetUseCustomCursorTypeNX_Cursor_Selecting,NX_BlockHighlightTool,LoadImage(App.hInstance,"c:\\mycursors\\testselect.cur",IMAGE_CURSOR,0,0,LR_LOADFROMFILE) NotateXpress1.SetUseCustomCursorTypeNX_Cursor_Moving,NX_BlockHighlightTool,LoadImage(App.hInstance,"c:\\mycursors\\testmove.cur",IMAGE_CURSOR,0,0,LR_LOADFROMFILE) EndSub |