Hi everyone. I am migrating a vb6 prog to vb net, and was wondering if loading a textfile to a textbox was similar in vb net.
I used this code in vb 6.
I am going to use something else for the path, but was wondering if there any changes to load it in vb net? Thank you!!
I used this code in vb 6.
VB Code:
Public Sub LoadMsgStatus() Dim sFileText As String Dim iFileNo As Integer iFileNo = FreeFile 'open the file for reading Open App.Path & "\MsgSwitch.txt" For Input As #iFileNo 'change this filename to an existing file! (or run the example below first) 'read the file until we reach the end Do While Not EOF(iFileNo) Input #iFileNo, sFileText 'close the file (if you dont do this, you wont be able to open it again!) Close #iFileNo End Sub
I am going to use something else for the path, but was wondering if there any changes to load it in vb net? Thank you!!