Click here to Skip to main content
15,891,951 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: External Media player sdk for vb Pin
Eddy Vluggen6-May-18 23:55
professionalEddy Vluggen6-May-18 23:55 
QuestionRe: External Media player sdk for vb Pin
Asanka Akash Sovis7-May-18 19:58
professionalAsanka Akash Sovis7-May-18 19:58 
AnswerRe: External Media player sdk for vb Pin
Eddy Vluggen7-May-18 22:39
professionalEddy Vluggen7-May-18 22:39 
Questionscrollable imagebox / change sizemode picturebox Pin
Michael Wild5-May-18 3:29
Michael Wild5-May-18 3:29 
QuestionHow overwrite the word after the specific word in text file... Pin
KimbleGray4-May-18 7:13
KimbleGray4-May-18 7:13 
AnswerRe: How overwrite the word after the specific word in text file... Pin
Dave Kreskowiak4-May-18 9:20
mveDave Kreskowiak4-May-18 9:20 
AnswerRe: How overwrite the word after the specific word in text file... Pin
Mycroft Holmes4-May-18 13:17
professionalMycroft Holmes4-May-18 13:17 
GeneralRe: How overwrite the word after the specific word in text file... Pin
KimbleGray5-May-18 4:25
KimbleGray5-May-18 4:25 
Hi RAH,

Thanks for the guidance, however, I still unable make the code work as below. Appreciate if you could show the example.

MyProfile_File = "C\MyProfile\MyProfile.txt"

      Dim MyProfile_StreamReader As New StreamReader(MyProfile_File)
      Dim MyProfile_Content As String

      MyProfile_Content = MyProfile_StreamReader.ReadToEnd
      MyProfile_StreamReader.Close()

      Dim MyProfile_StreamWriter As New StreamWriter(MyProfile_File, True)
      Dim a As String()

      a = Split(MyProfile_Content, vbCrLf)

      Dim sFix As String

      For i As Integer = 0 To a.Length - 1
          sFix = a(i)
          If a(i).IndexOf("ID = ") >= 0 Then
              sFix = sFix.Replace(a(i).IndexOf("ID = ") + 1, "1122334")
          End If
          MyProfile_StreamWriter.WriteLine(sFix)
      Next
      MyProfile_StreamWriter.Close()


Thanks.

Best Regards,
EK Tan
GeneralRe: How overwrite the word after the specific word in text file... Pin
Mycroft Holmes5-May-18 14:30
professionalMycroft Holmes5-May-18 14:30 
GeneralRe: How overwrite the word after the specific word in text file... Pin
mo14925-May-18 16:25
mo14925-May-18 16:25 
GeneralRe: How overwrite the word after the specific word in text file... Pin
KimbleGray7-May-18 4:01
KimbleGray7-May-18 4:01 
QuestionVerify files uploaded to ftp Pin
Marcus Genovese30-Apr-18 23:34
Marcus Genovese30-Apr-18 23:34 
AnswerRe: Verify files uploaded to ftp Pin
Gerry Schmitz1-May-18 5:24
mveGerry Schmitz1-May-18 5:24 
GeneralRe: Verify files uploaded to ftp Pin
Marcus Genovese2-May-18 3:04
Marcus Genovese2-May-18 3:04 
GeneralRe: Verify files uploaded to ftp Pin
Gerry Schmitz2-May-18 8:16
mveGerry Schmitz2-May-18 8:16 
AnswerRe: Verify files uploaded to ftp Pin
Jochen Arndt2-May-18 3:36
professionalJochen Arndt2-May-18 3:36 
QuestionCombobox Values using two different SQL tables Pin
gherkin1230-Apr-18 11:44
gherkin1230-Apr-18 11:44 
Questionmath challenge Pin
santi nuñez29-Apr-18 11:35
santi nuñez29-Apr-18 11:35 
AnswerRe: math challenge Pin
Richard MacCutchan29-Apr-18 21:25
mveRichard MacCutchan29-Apr-18 21:25 
GeneralRe: math challenge Pin
santi nuñez30-Apr-18 4:31
santi nuñez30-Apr-18 4:31 
GeneralRe: math challenge Pin
Richard MacCutchan30-Apr-18 5:38
mveRichard MacCutchan30-Apr-18 5:38 
GeneralRe: math challenge Pin
santi nuñez30-Apr-18 6:43
santi nuñez30-Apr-18 6:43 
GeneralRe: math challenge Pin
Richard MacCutchan30-Apr-18 6:53
mveRichard MacCutchan30-Apr-18 6:53 
GeneralRe: math challenge Pin
santi nuñez30-Apr-18 6:55
santi nuñez30-Apr-18 6:55 
GeneralRe: math challenge Pin
Richard Deeming30-Apr-18 7:02
mveRichard Deeming30-Apr-18 7:02 

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.