Information générale
Catégorie:
Contrôles ActiveX en VFP
Thanks Kenneth,
I'll try your suggestion.
Alvin
>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....
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement