try this:
Code:Imports System.Runtime.InteropServices Public Class Form1 <DllImport("user32.dll")> _ Private Shared Function SetSystemCursor(ByVal hCursor As IntPtr, ByVal id As Integer) As Boolean End Function <DllImport("user32.dll")> Private Shared Function LoadCursorFromFile(ByVal fileName As String) As IntPtr End Function <DllImport("user32.dll")> _ Public Shared Function CopyIcon(ByVal hIcon As IntPtr) As IntPtr End Function Const OCR_NORMAL As UInteger = 32512 Dim oldCursor As IntPtr Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed SetSystemCursor(CopyIcon(oldCursor), OCR_NORMAL) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load oldCursor = CopyIcon(Cursors.Default.CopyHandle) SetSystemCursor(CopyIcon(LoadCursorFromFile("C:\Users\-----\Desktop\-----\Textures\----- ----- --.cur")), OCR_NORMAL) End Sub End Class




Reply With Quote