Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 2012 Cannot set focus...
Message
De
30/04/2004 10:59:27
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Error 2012 Cannot set focus...
Divers
Thread ID:
00899782
Message ID:
00899782
Vues:
53
This one is driving me nuts, because I know there is a solution but I cannot remember it. I have the following code in the Valid for a drop down list box. It works very well unless the user clicks in the edit box behind the list box. When that happens the .setfocus command causes an error 2012. How can you tell if the user exits a list box by using a mouse click elsewhere? Is there any way to prevent this error. Thanks!

this.Visible=.f.
thisform.LockScreen=.t.
WITH this.Parent.eb1
holdstart=.selstart
newlen=holdstart+LEN(TRIM(letterstuff.descript))+5
.value=SUBSTR(.value,1,.selstart)+'<<'+TRIM(letterstuff.descript)+'>> '+SUBSTR (.value,.selstart+1)
.refresh()
thisform.LockScreen=.f.
.selstart=newlen
.setfocus()
ENDWITH
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform