Experts Exchange connects you with the people and services you need so you can get back to work.
Public Class Form1
Public Shared Sub Main()
End Sub 'Main
Public Sub New()
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Text = "Cursor Example"
' Looks namespace.MyCursor.cur in the assemblies manifest.
' The following generates a cursor from an embedded resource.
' To add a custom cursor, create or use an existing 16x16 bitmap
' 1. Add a new cursor file to your project:
' File->Add New Item->Local Project Items->Cursor File
' 2. Select 16x16 image type:
' Image->Current Icon Image Types->16x16
' --- To make the custom cursor an embedded resource ---
' In Visual Studio:
' 1. Select the cursor file in the Solution Explorer
' 2. Choose View->Properties.
' 3. In the properties window switch "Build Action" to "Embedded"
' On the command line:
' Add the following flag:
' The following line uses the namespace from the passed-in type
' and looks for CustomCursor.MyCursor.Cur in the assemblies manifest.
' NOTE: The cursor name is acase sensitive.
Me.Cursor = New Cursor(Me.GetType(), "MyCursor.Cur")
End Sub 'New
End Class 'Form1
End Namespace 'CustomCursor
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $151.20.
Premium members get this course for $159.20.
Premium members get this course for $37.50.
Premium members get this course for $174.99.
Premium members get this course for $62.50.
Premium members get this course for $389.00.