Friday, May 24, 2013
 
    Search Web Link
Search Software
    
API Home » Cursor » LoadCursorFromFile

LoadCursorFromFile

Category: Cursor
Hits: 5856 Rating: LoadCursorFromFile has been rated 2.24 by  1280 users (2.24) votes 1280
Rate: 1-star  2-stars  3-stars  4-stars  5-stars
E-mail this API to friend E-mail this Code to a friend  save Bookmark this VB API Function
API Explanation
LoadCursorFromFile loads a cursor from a cursor file. The cursor file can contain either a regular cursor (*.cur) or an animated cursor (*.ani). If successful, the function returns a cursor handle to the newly loaded cursor. If unsuccessful, the function returns 0.

Parameter Information
Declare Function LoadCursorFromFile Lib "user32.dll" Alias _
"LoadCursorFromFileA" (ByVal lpFileName As String) As Long

lpFileName
The filename of the cursor file to load. This file can either be a *.cur or an *.ani cursor file.
Code



' Load the cursor "C:\\MyProg\\custom.ani" and set it as
' the current cursor for three seconds. Then restore the original cursor as
' the current cursor.
Dim hcursor As Long ' receives handle to the loaded cursor
Dim holdcursor As Long ' receives handle to the previously in use cursor
Dim retval As Long ' throw-away return value

hcursor = LoadCursorFromFile("C:\\MyProg\\custom.ani") ' load the animated cursor from the file
If hcursor = 0 Then End ' abort program if cursor couldn't be loaded
holdcursor = SetCursor(hcursor) ' set the loaded cursor as the current cursor
Sleep 3000 ' wait for three seconds
retval = SetCursor(holdcursor) ' restore the previous cursor





HOME | MUSIC | DOWNLOADS |  GAMES | TEST-QUIZZES | SITEMAP | ABOUT | HELP
Copyright © 2000 - 2013 Ex-designz. All rights reserved. Website Developed By Dexter Zafra of Myasp-net.com
Link to us | Advertisement | Contact us | Privacy Policy | Terms of use | Accessibility