

In this example, 1,000 customers are displayed with 15 orders each. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer.
#Cursors set code#
The following code example displays customer information in a TreeView control. Me.Cursor = New Cursor(Me.GetType(), "M圜ursor.cur") 'NOTE: The cursor name is acase sensitive. 'and looks for CustomCursor.M圜ursor.cur in the assemblies manifest.

'The following line uses the namespace from the passed-in type ' and "CursorFileName.cur" is the cursor filename. ' Where "Namespace" is the namespace in which you want to use the cursor In the properties window switch "Build Action" to "Embedded Resources"

Select the cursor file in the Solution Explorer '- To make the custom cursor an embedded resource. ' Project->Add New Item->General->Cursor File ' The following generates a cursor from an embedded resource. This.Cursor = new Cursor(GetType(), "M圜ursor.cur") NOTE: The cursor name is acase sensitive. and looks for CustomCursor.M圜ursor.Cur in the assemblies manifest. The following line uses the namespace from the passed-in type and "CursorFileName.cur" is the cursor filename. Where "Namespace" is the namespace in which you want to use the cursor - To make the custom cursor an embedded resource. Project->Add New Item->General->Cursor File To add a custom cursor, create a bitmap The following generates a cursor from an embedded resource. To compile this example using the command line, include the following flag: /res:M圜ursor.Cur, CustomCursor.M圜ursor.Cur using System The example requires a cursor contained in a cursor file named M圜ursor.cur. The custom Cursor is embedded in the application's resource file. The following code example displays a form that demonstrates using a custom cursor.
