Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can to call setfocus when switch program
Message
De
15/09/1998 03:56:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/09/1998 22:05:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00136034
Message ID:
00136604
Vues:
24
>>>I would like to be in the textbox before I had switch to another program. Which command i must use. Example, suppose I work in program A textbox 5 and I open another program (Program B). After I close program B , I would like the cursor appear in textbox5 in program A .
>>> Thank for your help
>>>From No
>
>I mean I have set color in every Textbox.gotfocus. So, I cannot specific which textbox I am in use before switch to program B. And after I close program B, I would like the textbox in program A appear the color which I have set in textbox.gotfocus. So, for this reason , I cannot call textbox.setfocus after program B closed.

I still couldn't understand what you mean. I'll try to shoot in the dark.
-You set backcolor in gotfocus and reset in lostfocus. On return from formB you want again only the textbox with focus have different color (I think this is a miss shot). If so gotfocus+lostfocus code is sufficient and would do the job.
*Gotfocus
this.backcolor = rgb(255,255,0)
* Lostfocus
this.resettodefault("BackColor")
-On return from formB you want to be on a particular control - ie: text5. If so, although many ways for that, here is just one :
* formA calls formB
do form formB with thisform && Passes a ref to itself as a parameter

* FormB.init
lparameters oCaller
this.oCaller = oCaller && You save the ref to a custom form prop

* FormB.release
this.oCaller.text5.setfocus()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform