Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP OLE PCAnywhere 10.5

Status
Not open for further replies.

fdc

IS-IT--Management
Dec 26, 2001
15
US
I am using OLE for the first time. Host and remote systems are XP Home. Application creates object for Awrem32, and then does awconnect, multiple filexferto host, execute command on host and disconnect.
All works well if I run using debugger one step at a time and 'watch' PCAnywhre run.
However w/o debugger, VFP issues commands and continues w/o waiting on completion.
How do I cause VFP to wait for completion?
Really need help............... thanks.
FDC
 
Try setting:

Application.AutoYield = .f.

in your form's Init event.

Dave S.
 
DSummZZZ,
Thanks for your response, but I don't have a form (guess I should) Here's code.

mtest = "c:\documents and settings\all users\application data\symantec\pcanywhere\home.chf"

olet = createobject("awrem32.application")
=olet.awConnect(mtest)
mret = olet.ConnectionStatus()
if mret < 1
?mtest+ 'No connect'
olet.awdisconnect()
x && test
endif
xsource = 'c:\xfer\lawlpict.bmp'
xdest = 'c:\'
mret = olet.filexfertohost(xdest,xsource)
if mret = .t.
?&quot;xfer OK&quot;
else
x && test
endif
xsource = 'c:\lawl\compdep.prg'
xdest = 'c:\'
mret = olet.filexfertohost(xdest,xsource)
if mret = .t.
?&quot;xfer OK&quot;
else
?mret
?'no xfer'
endif
cmd = 'c:\lawl\rsup.exe'
mret = olet.executehostfile(cmd)
?mret
?'going to disconnect'
=olet.awdisconnect()
?'disconnect'
 
Before the line:
=olet.awConnect(mtest)
is where you'd put:
Application.AutoYield = .T. && or .F.

.T. is the default. Here's what Help says:
The following occurs when the AutoYield property is set to false (.F.):

ActiveX controls cannot process events until a wait state occurs, so clicking an ActiveX control has no effect while user program code is executing. This is the same behavior for Visual FoxPro controls such as the Grid.


ON KEY LABEL commands and mouse events are ignored while user program code is executing. The ON KEY LABEL commands and mouse events are placed in a queue and processed at the next wait state.


Pressing Esc does not interrupt program execution. This is identical to setting ESCAPE to OFF. In this case you cannot exit infinite loops without shutting down the instance of Visual FoxPro.


Queries cannot be interrupted.


Switching to other applications is supported, but you cannot switch back to Visual FoxPro while Visual FoxPro user program code is executing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top