Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 10,654 of 10,840    |
|    Ralph to Don    |
|    Re: Detect file opened by Notepad    |
|    13 Sep 08 16:55:08    |
   
   XPost: microsoft.public.vb.general.discussion, microsoft.public.vb   
   From: nt_consulting64@yahoo.com   
      
   "Don" wrote in message   
   news:48cbf7a3.5136375@news.west.cox.net...   
   >   
   > I wrote an app that alerts a user who attempts to open a file that the   
   > file is currently in use. It works fine except when the file is   
   > opened by Notepad. If a text file is opened, most computers are   
   > configured to use Notepad to open the file by default and if they are   
   > configured to use Notepad by default I want it to remain that way   
   > rather than retrieve the text into my app or force the user to use   
   > another app to read the file. I'm using the following code I found   
   > online and lErrNum returns a value of zero if Notepad has the file   
   > open but returns 70 when most other files are open using another   
   > application.   
   >   
   > Don   
      
   You might try and detect if the file has been changed since you last chewed   
   on it (or while you are chewing on it)   
      
   Take a look at FindFirstChangeNotification, FindNextChangeNotification.   
      
   -ralph   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca