Click here to Skip to main content
16,005,080 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: AI Project Pin
Dave Kreskowiak12-Aug-04 6:58
mveDave Kreskowiak12-Aug-04 6:58 
QuestionCan anyone suggest the right approach for the below mentioned issue/combination in Horizontal approuch on vb to .net migration Pin
ramarao21212-Aug-04 4:29
sussramarao21212-Aug-04 4:29 
GeneralCreateRemoteThread fails with Custom VB6 DLL Pin
Dr Memory12-Aug-04 3:25
Dr Memory12-Aug-04 3:25 
GeneralCreateRemoteThread fails with ActiveX DLL Pin
Dr Memory12-Aug-04 11:00
Dr Memory12-Aug-04 11:00 
Generali need to make search engine...!! Pin
Ashraf Fathy12-Aug-04 3:02
Ashraf Fathy12-Aug-04 3:02 
GeneralRe: Modify .xls from VB6 Pin
Purple Monk12-Aug-04 2:54
Purple Monk12-Aug-04 2:54 
GeneralModify .xls from VB6 Pin
Pablo.ar12-Aug-04 2:34
Pablo.ar12-Aug-04 2:34 
QuestionHow to Delete a file in C# or VB.NET Pin
Prabhu Ram Prasath12-Aug-04 1:59
Prabhu Ram Prasath12-Aug-04 1:59 
Hi,

Yeah... It is simple to delete an existing file... But what I need an implementation for the following algorithm. I will explain with a small example. I have an .exe file and execute it manually and I have a program which deletes a file. I run the program to delete the file which is currently executing. What I want is loop the following bit until the file is released i.e., until the program has ended.

Does anyone know this how to do it.

Thanks in Advance. The following is a general algorithm.

For WaitTime As Int16 = 0 To 220<br />
	System.Threading.Thread.Sleep(1000)<br />
	' Delete temporary file as soon as possible after it is freed.<br />
	Try<br />
	    If DeleteFile(ToFile)=True Then<br />
		'File Deleted<br />
		Exit For<br />
	    End If<br />
	Catch ex As Exception<br />
<br />
	End Try<br />
Next ' Otherwise, loop again and keep waiting...


Prabhu Ram Prasath
prabhuram@dsrc.co.in
AnswerRe: How to Delete a file in C# or VB.NET Pin
Member 53081012-Aug-04 3:07
Member 53081012-Aug-04 3:07 
GeneralRe: How to Delete a file in C# or VB.NET Pin
Dave Kreskowiak12-Aug-04 3:11
mveDave Kreskowiak12-Aug-04 3:11 
AnswerRe: How to Delete a file in C# or VB.NET Pin
Dave Kreskowiak12-Aug-04 3:37
mveDave Kreskowiak12-Aug-04 3:37 
GeneralRe: How to Delete a file in C# or VB.NET Pin
Member 53081012-Aug-04 4:32
Member 53081012-Aug-04 4:32 
GeneralRe: How to Delete a file in C# or VB.NET Pin
Dave Kreskowiak12-Aug-04 5:22
mveDave Kreskowiak12-Aug-04 5:22 
AnswerRe: How to Delete a file in C# or VB.NET Pin
Member 53081012-Aug-04 4:34
Member 53081012-Aug-04 4:34 
GeneralUnlocking Crystal Reports - vb6 Pin
steff kamush11-Aug-04 23:18
steff kamush11-Aug-04 23:18 
GeneralRe: Unlocking Crystal Reports - vb6 Pin
Dave Kreskowiak12-Aug-04 3:09
mveDave Kreskowiak12-Aug-04 3:09 
GeneralRe: Unlocking Crystal Reports - vb6 Pin
Jim Matthews12-Aug-04 3:40
Jim Matthews12-Aug-04 3:40 
GeneralRe: Unlocking Crystal Reports - vb6 Pin
steff kamush12-Aug-04 21:00
steff kamush12-Aug-04 21:00 
Generallast line in data grid not updating Pin
kowplunk11-Aug-04 17:58
kowplunk11-Aug-04 17:58 
GeneralRe: last line in data grid not updating Pin
Member 53081011-Aug-04 21:26
Member 53081011-Aug-04 21:26 
GeneralRe: last line in data grid not updating Pin
Jim Matthews12-Aug-04 4:37
Jim Matthews12-Aug-04 4:37 
GeneralModify .xml from VB6 Pin
Pablo.ar11-Aug-04 17:27
Pablo.ar11-Aug-04 17:27 
GeneralRe: Modify .xml from VB6 Pin
*Dreamz11-Aug-04 21:10
*Dreamz11-Aug-04 21:10 
GeneralRe: Modify .xml from VB6 Pin
Pablo.ar12-Aug-04 2:32
Pablo.ar12-Aug-04 2:32 
GeneralRe: Modify .xml from VB6 Pin
*Dreamz12-Aug-04 3:17
*Dreamz12-Aug-04 3:17 

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.