XPost: microsoft.public.vb.general.discussion, microsoft.public.vb   
   From: dsarvas@yahoo.com   
      
   On Sun, 14 Sep 2008 17:53:29 -0400, PeterD wrote:   
      
   >On Sun, 14 Sep 2008 15:19:34 GMT, dsarvas@yahoo.com (Don) wrote:   
   >   
   >>On Sun, 14 Sep 2008 08:50:24 -0400, PeterD wrote:   
   >>   
   >>>On Sat, 13 Sep 2008 22:17:45 GMT, dsarvas@yahoo.com (Don) wrote:   
   >>>   
   >>>>On Sat, 13 Sep 2008 17:53:38 -0400, PeterD wrote:   
   >>>>   
   >>>>>That old 'between a rock and a hard place' comes to mind. Consider   
   >>>>>this, can you perhaps run through the windows of open applications   
   >>>>>looking for Notepad, and seeing what file that window has open? That   
   >>>>>*might* work, but would be Notepad specific. I'm sure there are other   
   >>>>>programs that may present the same problems, too, however.   
   >>>>   
   >>>>That actually has possibilties. I do know how to enumerate through   
   >>>>all open windows and even target a Notepad window and it's caption,   
   >>>>but I would have to do so by accessing all workstations on the network   
   >>>>until I find one that is running that file via Notepad.   
   >>>   
   >>>Ouch... Yea, you're screwed. Maybe permissions is an answer. Only your   
   >>>application has write permissions for the file?   
   >>   
   >>Considering that, also. Might keep all files in folders with specific   
   >>rights made available only if they access the files through my app or   
   >>make the folders invisible except via the app.   
   >>   
   >>I think the answer is for my app to detect that they are attempting to   
   >>open a file with Notepad and create a detour, causing the file to open   
   >>in my app or an app I know will lock the file. My app already does   
   >>that, but I didn't want to have to do that.   
   >   
   >What extension are you using for your file? If you are using a   
   >commonly defined extension (.TXT, .DAT, etc.) you may find you are   
   >headed down a rocky road. You probably should:   
   >   
   >1. create your own unique extension (remember, you are not limited to   
   >three characters.) Search to make sure your extension is reasonably   
   >unique.   
   >   
   >2. Setup Windows so that when a file with that extension is clicked in   
   >Explorer, it opens in your program, not notepad.   
   >   
      
   I considered that and I think that can work. When the user selects   
   that particular file, my app can rename the file as you suggest. We   
   receive so many files from so many sources it would have to be done   
   this way rather than renaming every file as we receive them manually.   
      
   But my concern is that the files would always have to remain with   
   their new extension or renamed back after the user is done and if the   
   program ends unexpectedly, there could be a problem with the file left   
   named with the new extension rather than the .txt extension. I'm   
   thinking down the road how we might end up if we have text files left   
   with two different extensions.   
      
   I'm still inclined to set up my app to detour a user to another app   
   that does keep the file open or present a pop-up warning if they   
   choose to allow Notepad to open the file, they could be making changes   
   while others are doing the same at that very moment.   
      
   >>   
   >>>   
   >>>>Seems like   
   >>>>that would be the challenge of my lifetime but I might just try   
   >>>>researching that one.   
   >>>>Don   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|