Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "LoadCursorFromFile" in [All]

user32

.

private static extern IntPtr LoadCursorFromFile(string lpFileName);

.

    ? LoadCursorFromFile(BusyCursorIcon)

.

    : LoadCursorFromFile(DoneCursorIcon);

.

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.

.
Summary
.

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")

.
Documentation
[LoadCursorFromFile] on MSDN

 
Access PInvoke.net directly from VS: