Hello Zev,
The following sample code might be helpful:
Option Compare Database
Option Explicit
Private Declare Function LoadCursorBynum Lib "user32" Alias _
"LoadCursorA" (ByVal hinstance As Long, ByVal lpCursorName As Long) As Long
Private Declare Function LoadCursorFromFile Lib "user32" Alias _
"LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As
Long
'Public const IDC_CUSTOM = 1 ' User Defined Cursor
Public Const IDC_ARROW = 32512& ' Standard arrow
Public Const IDC_IBEAM = 32513& ' Text I-beam
Public Const IDC_WAIT = 32514& ' Hourglass
Public Const IDC_CROSS = 32515& ' Crosshair
Public Const IDC_UPARROW = 32516& ' Vertical arrow
Public Const IDC_SIZE = 32640& ' Windows NT only: Four-pointed arrow
Public Const IDC_ICON = 32641& ' Windows NT only: Empty icon
Public Const IDC_SIZENWSE = 32642& ' Double-pointed arrow pointing
northwest and southeast
Public Const IDC_SIZENESW = 32643& ' Double-pointed arrow pointing
northeast and southwest
Public Const IDC_SIZEWE = 32644& ' Double-pointed arrow pointing west
and east
Public Const IDC_SIZENS = 32645& ' Double-pointed arrow pointing
north and south
Public Const IDC_SIZEALL = 32646& ' Same as IDC_SIZE
Public Const IDC_NO = 32648& ' Slashed circle
Public Const IDC_APPSTARTING = 32650& ' Standard arrow and small hourglass
Public Const IDC_HELP = 32651& ' Arrow and question mark
Public Function MouseCursor(CursorType As Long)
Dim lngRet As Long
lngRet = LoadCursorBynum(0&, CursorType)
lngRet = SetCursor(lngRet)
End Function
Public Function PointM(strPathToCursor As String)
Dim lngRet As Long
lngRet = LoadCursorFormFile(strPathToCursor)
lngRet = SetCursor(lngRet)
End Function
Note: Microsoft provides programming examples for illustration only,
without warranty either expressed or implied, including, but not limited
to, the implied warranties of merchantability and/or fitness for a
particular purpose.
Thanks & Regards,
Peter Yang
MCSE2000, MCSA, MCDBA
Microsoft Partner Online Support
Get Secure! -
www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Zev" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: Re: Change Cursor
| Date: Thu, 9 Dec 2004 13:04:15 -0600
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| Message-ID: <##
[email protected]>
| Newsgroups: microsoft.public.access.formscoding
| NNTP-Posting-Host: 66.250.98.86
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.access.formscoding:255052
| X-Tomcat-NG: microsoft.public.access.formscoding
|
| With the Mouse Property I can only change to one of the list I want to
| change it to my Owen cursor
|
| Thank You For Your Help
|
| "Jesper F" <jesperfjoelnerAThotmailDOTcom> wrote in message
| | > > Is there any way I can change my mouse cursor at form load event and
| > should
| > > save it true out that application, I use the LoadCursorBynum API but
in
| > form
| > > load it's not working.
| >
| > You can use "Screen.Mousepointer = ..." to change the cursor in respons
| to
| > events (ex. form_load)
| > Check the help file for options. There's hourglas, arrow etc.
| >
| > Jesper Fjølner
| >
| >
|
|
|