Information générale
Catégorie:
Codage, syntaxe et commandes
Mark,
The migration route that I am following, which was suggested by Micro Endeavors, is to have VFP run the SPRs at first so that you can maintain your FPW 2.6 code while slowly converting to VFP. The idea is to get all the code complient with VFP using an IF 'VISUAL' $ UPPER(VERSION()) where needed and then start creating your VFP Forms one at a time. In this way you don't have to try to make the switch all at once.
I had read in the Knowledge base that _CUROBJ only worked with a READ and so it wouldn't work in a FORM. Well, since this is an SPR with @...GETs and a READ I figured that _CUROBJ should work. In fact, in the debug window _CUROBJ returns the correct object number but if you try to change the object number with a _CUROBJ=n the object number will not change but the object focus will have changed somewhere internally because it will go back to the previous object which had focus.
For now I'm using a work around with KEYBOARD '{BACKTAB}' and INKEY(). I guess I'll give up on _CUROBJ and just make any screens using this system memvar the first FORMS that I build.
Thanks again for the reply,
Ed
>Ed,
>
>I don't know why M$ left CUROBJ in since it no longer works. You will need to find every occurence of CUROBJ and replace it with the correct call to SetFocus().
>
>For example, if the object you are changing the focus to has the name of txtLastFocus and it is in the same container as the object you are currently on, the issuing This.Parent.txtLastFocus.SetFocus() will set the focus to the object you want. It gets a bit more complicated if the objects are in different containers, but you see the idea.
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