Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FTP ActiveX and _VFP.Autoyield=.f.
Message
From
11/02/1999 04:28:12
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00186381
Message ID:
00186403
Views:
20
Alvin,

I did all of this about two years ago with Mabry. It's a little strange getting used to it, but once you know how they want to do it, it works very well.

I don't have this in front of me, but from memory, it goes something like this:

First, you have to look into the Synchronous/Asychronous property for file transfers. This is documented pretty well in the documentation (once you know that that's what you are looking for). You want the setting that returns control to VFP immediately after the command is executed.

Because command is returning to VFP, you have to write a wrapper around the command, something like this:

MyForm.FlagProperty = .f.
_Vfp.Autoyield = .f.
MyMabryControl.SomeTransferCommand
DO WHILE ! MyForm.FlagProperty
DoEvents &&--Don't worry, does not slow down program
ENDDO

You then code up the Mabry event (again, can't recall exactly which one after two years) that fires during progress. This event will return a code when the transfer is finished, and you can set your flag MyForm.FlagProperty to true to drop out of the loop.

Because you are looping through a DoEvents, controls on your form will respond to user input, so you can put a command button on the form for "Cancel" When the user clicks here, ask them a question to make sure they really want to cancel, and then... here I really can't remember, I think you set a property of the Mabry control from within the progress event.

After you've digested this, let me know if you need more, maybe I can dig up that code....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform