Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows application WindowState(s)
Message
 
To
27/09/2001 10:30:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00559929
Message ID:
00561458
Views:
22
>George
>
>Thanks for the post and explanation concerning missing posts.

Glad to help.

>A question you may be consider to be off topic in which case I'll begin a new thread, but -
>
>How reliable would your "Is a Windows ..." code be in determining whether or not a file, not the application, is in use.

>The only "safe" part of a filename would be JUSTSTEM(JUSTFNAME(lcFileName)), but would probably be enough to activate a MESSAGEBOX([It appears that file xyz may be in use etc]).
>
>Or what better ideas do you have?
>
>Dennis

Not very. If the application was an MDI app, not at all. What the theory would be is to check the title bar of all open applications to see if the file you were searching for is in use by its presence in the title bar. However, if the application is an MDI application, the document may be in use, but not the current document being used. In this case the file would be in use, but wouldn't be reflected in the title bar. Simplest is probably to use FOPEN() to open the file on a low level. If the result is -1 it's in use.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform