Heenan, Lambert
Lambert.Heenan at AIG.com
Thu May 15 11:23:52 CDT 2003
Just did a little experimenting. It seems that the newly loaded mouse cursor
stays in effect only as long as the *code block* that called MouseCursor is
still executing. For example...
Sub testMC()
Dim ts As Single
MouseCursor (IDC_CROSS)
ts = Timer
While Timer - ts < 4
Wend
End Sub
... the above code will change the cursor and only when the While loop ends
do we see it change back to the default.
Lambert
> -----Original Message-----
> From: Roz Clarke [SMTP:roz.clarke at donnslaw.co.uk]
> Sent: Thursday, May 15, 2003 10:11 AM
> To: 'accessd at databaseadvisors.com'
> Subject: RE: [AccessD] Mouse pointer
>
> OK I have inserted the sample code into a module and tried to change the
> mouse pointer using one of the constants. Nothing happens. Stepping
> through the code
>
> Public Const IDC_CROSS = 32515&
>
> Declare Function LoadCursorBynum Lib "user32" Alias "LoadCursorA" _
> (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
>
> Declare Function SetCursor Lib "user32" _
> (ByVal hCursor As Long) As Long
>
> Function MouseCursor(CursorType As Long)
> Dim lngRet As Long
> lngRet = LoadCursorBynum(0&, CursorType)
> lngRet = SetCursor(lngRet)
> End Function
>
> having called it as so -> MouseCursor(IDC_CROSS), with a watch on lngRet
> I'm finding that the value of lngRet = 0 at all times. I'm inept at API to
> say the least - what am I missing here?
>
> Roz
>
> -----Original Message-----
> From: MastercafeCTV [mailto:mastercafe at ctv.es]
> Sent: 15 May 2003 14:24
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] Mouse pointer
>
>
> Check <http://www.mvps.org/access/index.html> you can see some
> samples and its application have the main cursor setting. I recommend you
> download and check the sample.
>
> Regards
>
> Juan
>
> -----Mensaje original-----
> De: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]En nombre de Roz Clarke
> Enviado el: jueves, 15 de mayo de 2003 15:02
> Para: 'accessd at databaseadvisors.com'
> Asunto: [AccessD] Mouse pointer
>
>
>
> Does anyone know how to set a custom mouse pointer? I want
> to use the mouse to indicate a drill-down field and none of the mouse
> settings listed in the VB help file (normal, hourglass, insert, resize)
> are suitable.
>
> TIA
>
> Roz
> << File: ATT776229.txt >>