Ouverture en lecture
VB6
Open MonApp.FicCfg For Input As #1
While Not EOF(1)
Line Input #1, r$
…………………..
…………………..
…………………..
Wend
Close
VB.net
FileOpen(1, MonApp.FicCfg, OpenMode.Input)
While Not EOF(1)
Input(1, r$)
…………………..
…………………..
…………………..
End While
FileClose()
Ouverture en écriture
VB6
Open App.Path & « \tmp.tmp » For Output As #2
…………………..
…………………..
Print #2, r$
Close
FileCopy App.Path & « \tmp.tmp », MonApp.FicCfg
Kill App.Path & « \tmp.tmp »
VB.net
FileOpen(2, Application.StartupPath & « \tmp.tmp », OpenMode.Output)
…………………..
…………………..
Print(2, r$ & vbCrLf)
FileClose()
FileCopy(Application.StartupPath & « \tmp.tmp », MonApp.FicCfg)
Kill(Application.StartupPath & « \tmp.tmp »)