Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I close a window
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01441149
Message ID:
01441171
Vues:
39
>ok let's say i used this version - it allows widows outside the vfp window.
>it does open in notepad but i don't know the code to close notepad. any suggestions i could try?
>
>thanks
>
>k
>
>
>#DEFINE SW_SHOWNORMAL 1
>lcUrl = "c:\vaniermu\ensnams.txt"
>oShell = Createobject("wscript.shell")
>oShell.Run(lcUrl)

I think the idea of this code is to let user view the text in notepad and then close. If you want to close it automatically, we need to know handle of the window or the process ID. As the worse case scenario we can always use Sergey's code to terminate the application (assuming it's always notepad), but I'm not sure it's a good solution.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform