Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I close a window
Message
De
29/12/2009 22:25:49
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01441149
Message ID:
01441181
Vues:
45
>I am using the following to OPEN a document.
>How do i close the same document?
>
>tnx
>k
>
>
>#DEFINE SW_SHOWNORMAL 1
>lcUrl = "c:myfile.txt"
>oShell = Createobject("wscript.shell")
>oShell.Run(lcUrl)
>
>DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>INTEGER hwnd, STRING lpVerb, STRING lpFile, ;
>STRING lpParameters, STRING lpDirectory, LONG nShowCmd
>ShellExecute(0, "Open", lcUrl, "", "", SW_SHOWNORMAL)

You'd need the process ID to kill it, or its hwnd to send it a close message, or something like that. There are, probably, ways to get those.

If you want to control the whole process, why not keep it in fox? Modify File "c:\myfile.txt" in macdesktop, store wontop() in a safe place, and when you want to close it, release window (lcWindowName). The "in macdesktop" is an old dirty trick which will open it as a top window form, outside of _screen.

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform