Notifications
Clear all

[Closed] Drag-Drop Material as String

Additionally, if you wanted to use the 3ds Max Drag&Drop cursors, you could use something like the following code:

(
 	struct DragDropCursors
 	(
 		PRIVATE
 		
 		DRAG_NO_CURSOR,
 		DRAG_OK_CURSOR,
 		cursor = dotnetClass "System.Windows.Forms.Cursor",
 		
 		on create do
 		(
 			DRAG_NO_CURSOR = (dotnetClass "ManagedServices.AppSDK+MaxCustomCursors").DRAG_NO_CURSOR
 			DRAG_OK_CURSOR = (dotnetClass "ManagedServices.AppSDK+MaxCustomCursors").DRAG_OK_CURSOR
 			GetMaxCursor = (dotnetclass "ManagedServices.AppSDK").GetMaxCustomCursor
 			
 			DRAG_NO_CURSOR = dotnetobject "System.Windows.Forms.Cursor" (dotnetobject "System.IntPtr" (GetMaxCursor DRAG_NO_CURSOR))
 			DRAG_OK_CURSOR = dotnetobject "System.Windows.Forms.Cursor" (dotnetobject "System.IntPtr" (GetMaxCursor DRAG_OK_CURSOR))
 		),
 		
 		PUBLIC
 		
 		fn SetCursor val =
 		(
 			case val of
 			(
 				1: cursor.Current = DRAG_OK_CURSOR
 				2: cursor.Current = DRAG_NO_CURSOR
 			)
 		)
 	)
 
 	cursor = DragDropCursors()
 	cursor.SetCursor 2
 )

very nice! i didn’t know about it

Page 2 / 2