Interesting.
It's also remarkable to note how in the .net context it is crucial the
position of the doevents w.r.t. the cursor setting (and this, according
Bob's suggestion, should be different from VBA):
"Note If you call Application.DoEvents before resetting the Current
property back to the Cursors.Default cursor, the application will
resume listening for mouse events and will resume displaying the
appropriate Cursor for each control in the application."
see:
http://msdn.microsoft.com/library/de...ClassTopic.asp
Bob Quintal ha scritto:
[color=blue]
>
tommaso.gastaldi@uniroma1.it wrote in
> news:1144180970.674314.206570@g10g2000cwb.googlegr oups.com:
>[color=green]
> > hi Henry ,
> >
> > in the .Net languages I have seen often the following schema:
> >
> > Application.DoEvents()
> > Cursor.Current = Cursors.WaitCursor
> >
> > ' ... intensive task here ...
> >
> > Cursor.Current = Cursors.Default
> > Application.DoEvents()
> >
> > can you do something similar in the language you are you using
> > ? Le me know...
> >
> > -t[/color]
>
> Doevents is all one needs in VBA.
>
> Docmd.Hourglass True
> DoEvents
>
> Dim dbs As DAO.Database
> Dim sSQL As String
>
> Set dbs = CurrentDb()
>
> Q
>[color=green]
> >
> > Henry Stockbridge ha scritto:
> >[color=darkred]
> >> Hi,
> >>
> >> I am running the following code and the visibility of the
> >> Hourglass appears late, instead of immediately. Any ideas of
> >> how I can remedy this?
> >>
> >> =============
> >>
> >> Private Sub lblUpdateMDList_Click()
> >>
> >> Docmd.Hourglass True
> >>
> >> Dim dbs As DAO.Database
> >> Dim sSQL As String
> >>
> >> Set dbs = CurrentDb()
> >>
> >> ' 1) Delete and append records
> >> sSQL = "DROP TABLE tblRepLookUp"
> >> dbs.Execute sSQL
> >> sSQL = "SELECT qryMDHospRep.hosCustomerID, "
> >> sSQL = sSQL & "qryMDHospRep.phyPhysicianID, "
> >> sSQL = sSQL & "qryMDHospRep.SalesRepID, qryMDHospRep."
> >> sSQL = sSQL & "SalesRepFirstName, qryMDHospRep."
> >> sSQL = sSQL & "SalesRepLastName, qryMDHospRep.SalesRep, "
> >> sSQL = sSQL & "qryMDHospRep.SalesRepType, qryMDHospRep."
> >> sSQL = sSQL & "RegionRepID, qryMDHospRep."
> >> sSQL = sSQL & "RegionManagerFirstName, qryMDHospRep."
> >> sSQL = sSQL & "RegionManagerLastName, qryMDHospRep."
> >> sSQL = sSQL & "RegionManager INTO tblRepLookUp "
> >> sSQL = sSQL & "FROM qryMDHospRep;"
> >>
> >> dbs.Execute sSQL
> >>
> >> Docmd.Hourglass False
> >>
> >> MsgBox "Physician List Complete", vbInformation +
> >> vbOKOnly, "Process
> >> Complete"
> >> Set dbs = Nothing
> >>
> >> End Sub
> >>
> >> ====================
> >>
> >> Thanks in advance,
> >>
> >> Henry[/color]
> >[/color]
>
>
>
> --
> Bob Quintal
>
> PA is y I've altered my email address.[/color]