Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I close a window
Message
 
 
To
29/12/2009 20:09:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01441149
Message ID:
01441171
Views:
37
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform