salut tout le monde!
je développe sous Visual Basic 2005 edition express.
Mon souci c'est que lors du lancement de mon application qui consiste à écrire sur un fichier texte le programme génère une exception en me disant sous msgbox.

---------------------------
RDWRfromtxt
---------------------------
Input string was not in a correct format.
---------------------------
OK
---------------------------


là un bout du programme de l'ecriture:
PublicClass Form1
Private tabTrames() As tramrec 'tableau de trames
Dim sr As StreamReader
Dim SW As IO.StreamWriter = File.CreateText("C:\user\U256265\Visual Studio 2005\scarv06.txt")
'Dim timerDelegate As New Threading.TimerCallback(AddressOf CheckStatus)
Dim tes AsNew timerstatus
Dim f AsString
Dim s AsString
Sub ecritureFichier(ByVal fichier AsString)
'My.Computer.FileSystem.WriteAllText("c:\user\U256265\Visual Studio 2005\zouh.txt", "sa marche pas !!!!!", True)
Try
'Instanciation du StreamWriter avec passage du nom du fichier
'Dim monStreamWriter As StreamWriter = New StreamWriter("c:\user\U256265\Visual Studio 2005\scarv06.txt")
'Ecriture du texte dans votre fichier
SW.WriteLine("Imports System.Runtime.InteropServices")
SW.WriteLine(
"Imports System.Reflection")
SW.WriteLine(
"Imports System.Collections.Specialized")
SW.WriteLine(
"Imports System.Threading")
SW.WriteLine(
"Imports System.IO")
SW.WriteLine(
"Public Delegate Sub TransmitDelegate(ByVal nom As String, ByVal val As Integer)")
SW.WriteLine(
"Public Event transmitEvent As TransmitDelegate")
SW.WriteLine(
"#Region ""déclarations de variables""")
SW.WriteLine(
"Private WithEvents oCanusb As Canusb")
SW.WriteLine(
"Public swf As _ AxShockwaveFlashObjects.AxShockwaveFlash")
SW.WriteLine(
"'trame 100h périodique CMD_VAIO_P1")
SW.WriteLine(
"Dim VITESSE As Integer")

SW.WriteLine(
"Dim VIT_MOY As Integer")

'Fermeture du StreamWriter (Très important)
SW.Close()
Catch ex As Exception
'Code exécuté en cas d'exception
MsgBox(ex.Message)
EndTry
EndSub

Je comprend pas pourquoi il me génère cette exception !!