Click here to Skip to main content
15,894,017 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: progress bar Pin
KreativeKai9-Apr-10 6:05
professionalKreativeKai9-Apr-10 6:05 
AnswerRe: progress bar Pin
Gregory Gadow7-Apr-10 7:49
Gregory Gadow7-Apr-10 7:49 
Questionbecause it is being used by another process Pin
KreativeKai6-Apr-10 7:56
professionalKreativeKai6-Apr-10 7:56 
AnswerRe: because it is being used by another process Pin
Kschuler6-Apr-10 8:34
Kschuler6-Apr-10 8:34 
GeneralRe: because it is being used by another process Pin
KreativeKai6-Apr-10 9:21
professionalKreativeKai6-Apr-10 9:21 
AnswerRe: because it is being used by another process Pin
Gregory Gadow6-Apr-10 9:07
Gregory Gadow6-Apr-10 9:07 
GeneralRe: because it is being used by another process Pin
KreativeKai6-Apr-10 9:16
professionalKreativeKai6-Apr-10 9:16 
GeneralRe: because it is being used by another process [modified] Pin
Dave Kreskowiak6-Apr-10 10:06
mveDave Kreskowiak6-Apr-10 10:06 
If you're using a file to prevent a second instance from being opened, you have a problem. This won't work in all cases since you can have two instances of your app both checking for the existance of the file and both trying to create the file at the same time.

A better solution is to create a Mutex instead. A file can be created by multiple processes at the same time. A Mutex cannot. If two processes try to create the same mutex as the same time, one of them is forced to wait until the other request completes.

Documention on the Mutex class can be found here[^]. Just be sure to read it and to release the Mutex when your app is done with it.

A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




modified on Tuesday, April 6, 2010 6:44 PM

GeneralRe: because it is being used by another process Pin
KreativeKai7-Apr-10 6:22
professionalKreativeKai7-Apr-10 6:22 
Questionfilesystemwatcher and linux Pin
wikus706-Apr-10 3:54
wikus706-Apr-10 3:54 
AnswerRe: filesystemwatcher and linux Pin
Dave Kreskowiak6-Apr-10 4:09
mveDave Kreskowiak6-Apr-10 4:09 
GeneralRe: filesystemwatcher and linux Pin
wikus706-Apr-10 4:19
wikus706-Apr-10 4:19 
GeneralRe: filesystemwatcher and linux Pin
Dave Kreskowiak6-Apr-10 7:12
mveDave Kreskowiak6-Apr-10 7:12 
GeneralRe: filesystemwatcher and linux Pin
wikus706-Apr-10 20:00
wikus706-Apr-10 20:00 
GeneralRe: filesystemwatcher and linux Pin
Dave Kreskowiak7-Apr-10 2:03
mveDave Kreskowiak7-Apr-10 2:03 
AnswerRe: filesystemwatcher and linux Pin
Steven J Jowett7-Apr-10 2:01
Steven J Jowett7-Apr-10 2:01 
QuestionHow to Total Shared Variable in Crystal Report Pin
.NET- India 5-Apr-10 23:55
.NET- India 5-Apr-10 23:55 
AnswerRe: How to Total Shared Variable in Crystal Report Pin
Anubhava Dimri7-Apr-10 19:21
Anubhava Dimri7-Apr-10 19:21 
QuestionListbox Values in [modified] Pin
Anubhava Dimri5-Apr-10 21:43
Anubhava Dimri5-Apr-10 21:43 
AnswerRe: Listbox Values in Pin
Steven J Jowett5-Apr-10 21:46
Steven J Jowett5-Apr-10 21:46 
GeneralRe: Listbox Values in Pin
Anubhava Dimri5-Apr-10 22:00
Anubhava Dimri5-Apr-10 22:00 
GeneralRe: Listbox Values in Pin
Eddy Vluggen5-Apr-10 22:10
professionalEddy Vluggen5-Apr-10 22:10 
QuestionFlickers Pin
Anubhava Dimri5-Apr-10 20:08
Anubhava Dimri5-Apr-10 20:08 
AnswerRe: Flickers Pin
Dave Kreskowiak6-Apr-10 1:43
mveDave Kreskowiak6-Apr-10 1:43 
Questionweb bot Pin
mabrahao5-Apr-10 4:47
mabrahao5-Apr-10 4:47 

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

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