--
Fred
Microsoft Visual FoxPro MVP
"Herkus" <a...@b.com> wrote in message
news:ecZo30tM...@TK2MSFTNGP02.phx.gbl...
You can also use the native Sleep() API function.
Declare integer Sleep in win32api integer
nMilliSeconds=1000
Sleep(nMilliSeconds)
hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Herkus,
***
Note that you are specifying that you are waiting for a KEY press to
continue.
*****************************************************************************************
Try this example from the VFP Help.
CHRSAW( ) Function Example
In the following example, the system displays a window containing
input fields created with @ ... GET commands, and waits 5 seconds for
keyboard input. If a key isn't pressed in this time period, CHRSAW( )
returns false (.F.) and the program terminates.
SET TALK OFF
DEFINE WINDOW wEnter FROM 7,10 to 13,70 PANEL
ACTIVATE WINDOW wEnter
@ 1,3 SAY 'Customer: ' GET gcCustomer DEFAULT SPACE(40)
@ 3,3 SAY 'Address: ' GET gcAddress DEFAULT SPACE(40)
WAIT WINDOW 'Waiting for input' NOWAIT
IF NOT CHRSAW(5)
DEACTIVATE WINDOW wEnter
CLEAR GETS
ELSE
READ
DEACTIVATE WINDOW wEnter
ENDIF
RELEASE WINDOW wEnter
WAIT
CLEAR
***
*****************************************************************************************
Try a simple "Wait" check the VFP Help.
"Specifies a custom message to display. If you omit cMessageText,
Visual FoxPro displays the default message. If cMessageText is an
empty string (""), a message isn't displayed and Visual FoxPro waits
until a key is pressed before continuing program execution."
WAIT WINDOW ""
IF NOT CHRSAW()
DEACTIVATE WINDOW wEnter
CLEAR GETS
ELSE
READ
DEACTIVATE WINDOW wEnter
ENDIF
RELEASE WINDOW wEnter
I just tested it, and there will be a minimal window, which cannot be
placed off the form, and not behind anything. Maybe you could have a
little commandbutton, same size as the little wait window, then you
could overlay on on the other, the user not seeing anything
different. So play with it.
*****************************************************************************************
Note that you are specifying that you are waiting for a KEY press to
continue.
I've thought about setting focus to an invisible cmdSetFocus
button,which should hide the cursor.
call the cmdSetFocus.click() with the ChrSaw() function inside it.
=thisform.cmdSetFocus.click()
*(: thisform.cmdSetFocus.Click()
*- ChrSaw() requires a KEY entry to exit this loop.
do while NOT CHRSAW()
*- comment this testing 'wait window', still works.
wait window 'not ChrSaw() ' nowait
enddo
play with it.
*****************************************************************************************
***
***
good luck,
Glen Ellis, Memphis, TN, www.GeoCities.Com/glene77is
Inkey(2)
Waits for 2 seconds.
--
Cheers
Carsten
_______________________________
"Herkus" <a...@b.com> schrieb im Newsbeitrag
news:ecZo30tM...@TK2MSFTNGP02.phx.gbl...