Click here to Skip to main content
15,902,445 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionOpenGL Pin
spelltwister26-Jun-06 11:08
spelltwister26-Jun-06 11:08 
AnswerRe: OpenGL Pin
Jun Du27-Jun-06 5:02
Jun Du27-Jun-06 5:02 
QuestionDirectory List/File Busy Pin
Scott_Roberts26-Jun-06 8:19
Scott_Roberts26-Jun-06 8:19 
AnswerRe: Directory List/File Busy [modified] Pin
Dave Kreskowiak26-Jun-06 8:52
mveDave Kreskowiak26-Jun-06 8:52 
GeneralRe: Directory List/File Busy Pin
Scott_Roberts26-Jun-06 8:59
Scott_Roberts26-Jun-06 8:59 
GeneralRe: Directory List/File Busy Pin
Dave Kreskowiak26-Jun-06 9:07
mveDave Kreskowiak26-Jun-06 9:07 
GeneralRe: Directory List/File Busy Pin
Scott_Roberts26-Jun-06 9:16
Scott_Roberts26-Jun-06 9:16 
GeneralRe: Directory List/File Busy Pin
Dave Kreskowiak27-Jun-06 1:29
mveDave Kreskowiak27-Jun-06 1:29 
STemaat wrote:
I think I'm getting my mind warapped around the first one...my thought is to simply "touch" every file that happens to be in the directory, which would fire the changed event of the watcher.


You could do that, but the FileSystemWatcher has been known to miss events now and then when firing alot of them all at once. "Touching" the files involves extra work you don't have to do. Just get the list of files and pass each one to the routine that does the processing. The event handler for the FSW should be doing the same thing.


STemaat wrote:
First concept that comes to mind on the second issue is putting the file open into an Until loop.


Yep. All you have to do is put the thread to sleep for a little while, maybe one second, inside the loop if the Open fails. That way you're not bogging down the system.
Dim attempting As Boolean = True
While attempting
    Try
        ' Open the file for exclusive read/write
        ' close it
        ' pass the filename to some method to do the actual processing
        attempting = False
    Catch
        Thread.Sleep(1000)
    End Try
End While



Dave Kreskowiak
Microsoft MVP - Visual Basic

GeneralRe: Directory List/File Busy Pin
Scott_Roberts26-Jun-06 12:59
Scott_Roberts26-Jun-06 12:59 
Questioncontrolling playback speed of audio files. Pin
mkm300526-Jun-06 7:41
mkm300526-Jun-06 7:41 
AnswerRe: controlling playback speed of audio files. Pin
Dave Kreskowiak26-Jun-06 8:47
mveDave Kreskowiak26-Jun-06 8:47 
QuestionHow do I use Select Case on checkboxes in a Groupbox control? Pin
Rashar26-Jun-06 6:34
Rashar26-Jun-06 6:34 
AnswerRe: How do I use Select Case on checkboxes in a Groupbox control? Pin
Dave Kreskowiak26-Jun-06 8:45
mveDave Kreskowiak26-Jun-06 8:45 
Questionhow can i convert vb6 source file to vb.net 2003 file Pin
saneng26-Jun-06 6:24
saneng26-Jun-06 6:24 
AnswerRe: how can i convert vb6 source file to vb.net 2003 file Pin
Dave Kreskowiak26-Jun-06 8:35
mveDave Kreskowiak26-Jun-06 8:35 
QuestionHow can I convert VB6 to VB.NET2003 Pin
Adekolurejo26-Jun-06 6:10
Adekolurejo26-Jun-06 6:10 
AnswerRe: How can I convert VB6 to VB.NET2003 Pin
Dave Kreskowiak26-Jun-06 8:30
mveDave Kreskowiak26-Jun-06 8:30 
QuestionVBScript to split file path into 3 bits Pin
mil_an26-Jun-06 5:43
mil_an26-Jun-06 5:43 
AnswerRe: VBScript to split file path into 3 bits [modified] Pin
Dave Kreskowiak26-Jun-06 8:33
mveDave Kreskowiak26-Jun-06 8:33 
GeneralRe: VBScript to split file path into 3 bits Pin
mil_an28-Jun-06 0:47
mil_an28-Jun-06 0:47 
Questionslovenian codepage Pin
Marc Soleda26-Jun-06 4:46
Marc Soleda26-Jun-06 4:46 
QuestionAvoid Validation while closing the form Pin
nagarajanrj26-Jun-06 4:43
nagarajanrj26-Jun-06 4:43 
AnswerRe: Avoid Validation while closing the form Pin
Dave Kreskowiak26-Jun-06 5:07
mveDave Kreskowiak26-Jun-06 5:07 
QuestionRemoving application from the bottom panel [modified] Pin
mikeskeeter26-Jun-06 4:24
mikeskeeter26-Jun-06 4:24 
AnswerRe: Removing application from the bottom panel Pin
Dave Kreskowiak26-Jun-06 5:01
mveDave Kreskowiak26-Jun-06 5:01 

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.