Board index » Visual Studio » Can WebBrowser1.Navigate set exclusive?

Can WebBrowser1.Navigate set exclusive?

Visual Studio183
Hi All,



The following method loads the file to be displayed.

e.g. WebBrowser1.Navigate "myfiletodisplay"



If I have multiple users opening files from a single

directory, is there a way to flag the opening of the

file to be exclusive so that the second user "sees"

that this file is currently already open?



TIA,

Mark


-
 

Re:Can WebBrowser1.Navigate set exclusive?

theres always a way...



Write a few lines of code to set one of the file attributes... either

the Read Only flag or the Archive Ready flag... reset them at the time

the user navigates away from the file...



check prior to opening a file if the particular flag is set... If so

do not permit them to navigate there...



Another approach is to write a text file with the same name as the

file they are opening and append a distinct file extension to it...

then if that filename exists you deny then the chance of opening the file.

delete the file when they are done...



You must permit the ability to override this feature though... Blown

code or browser windows will not undo or delete the flag or file you

set in place...



Computers are a wonderful thing, no?



D.





Mark wrote:



Quote
Hi All,



The following method loads the file to be displayed.

e.g. WebBrowser1.Navigate "myfiletodisplay"



If I have multiple users opening files from a single

directory, is there a way to flag the opening of the

file to be exclusive so that the second user "sees"

that this file is currently already open?



TIA,

Mark





-