Desktop Functions: Smart Device Functions:
|
Search Results for "LoadCursorFromFile" in [All]user321: CopyIcon
private static extern IntPtr LoadCursorFromFile(string lpFileName);
? LoadCursorFromFile(BusyCursorIcon)
: LoadCursorFromFile(DoneCursorIcon); 2: LoadCursor This function may not solve your problems when trying to load animated or colored cursors stored as embedded resources. I've wasted hours trying to get it to work to no avail. The LoadCursorFromFile method however works perfectly, so you might want to extract your cursor resource to a temp file and use the P/Invoke for that function.
static extern IntPtr LoadCursorFromFile(string lpFileName);
Private Shared Function LoadCursorFromFile(ByVal lpFileName As String) As IntPtr
IntPtr colorCursorHandle = LoadCursorFromFile("PencilCursor.cur");
Private Shared Function LoadCursorFromFile(ByVal lpFileName As String) As IntPtr
mhAniCursor = LoadCursorFromFile("c:\FarbCursor.cur") |