Click here to Skip to main content
       

Visual Basic

 
AnswerRe: Retrive date from sql server in system date format in VB6 application by a one time setting PinmvpDave Kreskowiak13-Nov-12 14:00 
QuestionHow to find out if a file is in use before reading the data in that file PinmemberKreativeKai13-Nov-12 7:47 
AnswerRe: How to find out if a file is in use before reading the data in that file PinmvpDave Kreskowiak13-Nov-12 8:09 
GeneralRe: How to find out if a file is in use before reading the data in that file PinmemberKreativeKai13-Nov-12 8:22 
GeneralRe: How to find out if a file is in use before reading the data in that file PinmemberKreativeKai13-Nov-12 8:46 
AnswerRe: How to find out if a file is in use before reading the data in that file PinmemberKreativeKai13-Nov-12 8:13 
GeneralRe: How to find out if a file is in use before reading the data in that file [modified] PinmvpDave Kreskowiak13-Nov-12 9:57 
AnswerRe: How to find out if a file is in use before reading the data in that file PinmemberEddy Vluggen13-Nov-12 11:41 
KreativeKai wrote:
Any ideas?

A file being reported as "in use" may even vary on the file-system being used; there is no real way of testing, but trying and recovering if things go wrong.
 
For reading, that means simply putting up a message that the file is locked by another application which needs to be closed first. For writing, it means (in the ideal case) that one offers a SaveFileDialog to save the file under a new name.
 
"Testing and opening" is not an option, since it creates a race-condition; the file could be opened between the moment you checked it's status and the moment you're going to lock it.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: How to find out if a file is in use before reading the data in that file PinmemberKreativeKai14-Nov-12 1:37 
GeneralRe: How to find out if a file is in use before reading the data in that file [modified] PinmemberVitorHugoGarcia19-Nov-12 1:12 
QuestionVB Script for automatically turning off the monitor PinmemberPrasan Cumar13-Nov-12 4:14 
AnswerRe: VB Script for automatically turning off the monitor PinmvpDave Kreskowiak13-Nov-12 4:59 
AnswerRe: VB Script for automatically turning off the monitor PinmemberBernhard Hiller13-Nov-12 21:20 
QuestionSQL Configuration PinmemberDinoRondelly13-Nov-12 3:46 
AnswerRe: SQL Configuration PinmemberDavid Mujica13-Nov-12 4:07 
GeneralRe: SQL Configuration PinmemberDinoRondelly13-Nov-12 5:56 
GeneralRe: SQL Configuration PinmemberDavid Mujica13-Nov-12 9:44 
GeneralRe: SQL Configuration PinmemberDinoRondelly13-Nov-12 18:17 
QuestionSource Code PinmemberMember 939009712-Nov-12 15:59 
AnswerRe: Source Code PinmvpDave Kreskowiak13-Nov-12 2:20 
QuestionMonitoring Network Usage For Remote Users [modified] PinmemberDinoRondelly12-Nov-12 10:54 
AnswerRe: Monitoring Network Usage For Remote Users PinmemberEddy Vluggen13-Nov-12 11:44 
QuestionScan Multipage Tiff Image For A Barcode Pinmemberdaveofgv12-Nov-12 4:07 
AnswerRe: Scan Multipage Tiff Image For A Barcode PinmemberEddy Vluggen12-Nov-12 10:54 
QuestionGetting All Logged On Users and IP VB.net PinmemberDinoRondelly12-Nov-12 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 18 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid