Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show Window Command
Message
De
04/06/2004 20:07:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
04/06/2004 16:39:34
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00910143
Message ID:
00910243
Vues:
34
>I am using VFP8.
>
>I am trying to get the SHOW WINDOW command to work with a form. In my app, if a form is opened, in a particular situation, I want to bring that form to the front. I am trying the following but nothing is happening.
> "SHOW WINDOW MyFormName TOP"
>
>For example, Form1 and Form2 are running, a user hits a button on Form2 and Form1 should come to the front. But my "SHOW WINDOW MyFormName TOP" command does not bring the desired form to the front. Nothing happens, no error.
>
>But if I place an invalid form name in the command I do get an "Window 'x' has not been defined". "SHOW WINDOW FormThatDoesntExist TOP"

Show Window is an outdated command, since it comes from DOS days, when it was designed as a part of the set which gave Fox windows, just like Mac had (and Fox for Mac had real Mac windows, of course).

Now under VFP we may still use them, but they implicitly create a form with special properties. The old Window commands use name property of a form as the window's name (which makes sense more than the old DOS habit of assuming a name from the title, and we never knew what will it be).

So, don't use a form name - you actually don't know that name. But the form itself knows its own name, you only need an object reference to the form:
show window (oForm1.name)
Of course, it's much easier to say oForm1.show(), right?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform