<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'VS 2010 How to change the 2 words from the file using a button ?' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'VS 2010 How to change the 2 words from the file using a button ?' posted on the 'Visual Basic' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 18 Jun 2013 00:26:08 -0700</pubDate>
    <lastBuildDate>Tue, 18 Jun 2013 00:26:08 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>VS 2010 How to change the 2 words from the file using a button ?</title>
      <link>http://www.programmersheaven.com/mb/VBasic/427179/427179/vs-2010-how-to-change-the-2-words-from-the-file-using-a-button-/</link>
      <description>So Im working on a program that shows this. &lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://img832.imageshack.us/img832/118/configasdasd.jpg" /&gt;&lt;br /&gt;
&lt;br /&gt;
This is the code that I use two show the SA and PLATINUM from the file, they are not the only characters on the line, like this:&lt;br /&gt;
&lt;br /&gt;
.....&lt;br /&gt;
set username=sa&lt;br /&gt;
set password=platinum&lt;br /&gt;
.....&lt;br /&gt;
&lt;br /&gt;
code to show only those two words. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt; Dim lines() As String = IO.File.ReadAllLines("C:\NTMBackup1\NTMBackup4.bat
")
        Dim userIndex As Integer = Array.FindIndex(lines, Function(s) s.Contains("utilizador"))
        Dim psswrdIndex As Integer = Array.FindIndex(lines, Function(s) s.Contains("password"))

        Me.txtusr.Text = lines(userIndex).Substring(lines(userIndex).IndexO
f("="c)).Substring(1)
        Me.txtpassowrd.Text = lines(psswrdIndex).Substring(lines(psswrdIndex).In
dexOf("="c)).Substring(1)&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What I want is to change the "sa" and "platinum" at the textboxes and then save them on the file, to looks like:&lt;br /&gt;
&lt;br /&gt;
.....&lt;br /&gt;
set username=something&lt;br /&gt;
set password=something&lt;br /&gt;
.....&lt;br /&gt;
Thanks for help&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBasic/427179/427179/vs-2010-how-to-change-the-2-words-from-the-file-using-a-button-/</guid>
      <pubDate>Thu, 02 Feb 2012 09:01:32 -0700</pubDate>
      <category>Visual Basic</category>
    </item>
  </channel>
</rss>