Question about using LOOP
Posted: Wed Jun 13, 2007 1:42 pm
Hello,
In my application, I use OLE to work together with MS-Word.
While working in Word, my application needs to wait until a button is pushed which end Word.
For waiting, I use this code :
When VActive = .F., the loop is ended and my application continues.
While my application is waiting, I often notice that the processor is used 100 %. This is eventually slowing down other running applications.
Is there a possibility to prevent that the processor is used for 100 % ?
I use Windows XP Professional and Microsoft Office 2003. My PC has 1 GB RAM.
Thanks a lot for any help.
In my application, I use OLE to work together with MS-Word.
While working in Word, my application needs to wait until a button is pushed which end Word.
For waiting, I use this code :
Code: Select all
DO WHILE .T.
IF VActive
SYSREFRESH()
LOOP
ENDIF
EXIT
ENDDO
While my application is waiting, I often notice that the processor is used 100 %. This is eventually slowing down other running applications.
Is there a possibility to prevent that the processor is used for 100 % ?
I use Windows XP Professional and Microsoft Office 2003. My PC has 1 GB RAM.
Thanks a lot for any help.