Double Close!
Hey
I'm trying to write an array containing file directories to a text document. When i try this code on form close it writes to the file, but i have to hit close twice most of the time :\ Could anyone explain why?
I'm trying to write an array containing file directories to a text document. When i try this code on form close it writes to the file, but i have to hit close twice most of the time :\ Could anyone explain why?
Code:
Dim w As New StreamWriter("C:\IMtemp\dlls.txt")
For Each IDLL In dlls
If counter3 < ListBox1.Items.Count Then
w.WriteLine(IDLL)
counter3 = counter3 + 1
End If
Next
w.Close()

I still have to close the form twice.
. It's messy as fuck but it should work anyway.