Click here to Skip to main content
15,921,959 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Monitoring printer - help ! Pin
Eddy Vluggen19-Jan-09 8:21
professionalEddy Vluggen19-Jan-09 8:21 
QuestionPassing arguments to timer event Pin
sohaib_a18-Jan-09 0:25
sohaib_a18-Jan-09 0:25 
AnswerRe: Passing arguments to timer event Pin
Wendelius18-Jan-09 0:39
mentorWendelius18-Jan-09 0:39 
GeneralRe: Passing arguments to timer event Pin
sohaib_a18-Jan-09 0:52
sohaib_a18-Jan-09 0:52 
GeneralRe: Passing arguments to timer event Pin
Wendelius18-Jan-09 1:10
mentorWendelius18-Jan-09 1:10 
GeneralRe: Passing arguments to timer event Pin
sohaib_a18-Jan-09 1:58
sohaib_a18-Jan-09 1:58 
GeneralRe: Passing arguments to timer event Pin
Wendelius18-Jan-09 2:04
mentorWendelius18-Jan-09 2:04 
QuestionDeleting multiple lines from a .txt file. Pin
RPiskami17-Jan-09 18:55
RPiskami17-Jan-09 18:55 
Hi, I am new to this site and so far it has been very helpful, however, I have a problem.

Here is what I have so far:
If File.Exists("C:\\File.txt") Then
         Dim sReader As New StreamReader("C:\\File.txt")
         Dim CurrentLine As String
         Dim DataLines As New System.Collections.Specialized.StringCollection

         Do While sReader.EndOfStream = False
             CurrentLine = sReader.ReadLine
             If CurrentLine.Contains(txtR1.Text) = False Then
                 DataLines.Add(CurrentLine)
             End If
         Loop
         sReader.Close()
         sReader = Nothing

         Dim sWriter As New StreamWriter("C:\\File.txt")

         For Each CurrentLine In DataLines
             sWriter.WriteLine(CurrentLine)
         Next
         sWriter.Close()
         sWriter = Nothing
    end if


As you can see txtR1.text is what contains the string that needs to be deleted from the .txt file. It works and will delete the string from the text file (if it is there). However I want to delete from txtR2.text and txtR3.text as well. Unsure if this is possible, is there a way to combine txtR1, txtR2, txtR3?

Using Vb.net(05)
Thanks!
-Rp
AnswerRe: Deleting multiple lines from a .txt file. Pin
Wendelius17-Jan-09 22:32
mentorWendelius17-Jan-09 22:32 
AnswerRe: Deleting multiple lines from a .txt file. Pin
Fernando Soto18-Jan-09 5:40
Fernando Soto18-Jan-09 5:40 
AnswerRe: Deleting multiple lines from a .txt file. [modified] Pin
RPiskami18-Jan-09 10:44
RPiskami18-Jan-09 10:44 
QuestionHow to Add Carriage return line feed to string (globalization) Pin
Georg Kohler17-Jan-09 16:41
Georg Kohler17-Jan-09 16:41 
AnswerRe: How to Add Carriage return line feed to string (globalization) Pin
Wendelius17-Jan-09 22:21
mentorWendelius17-Jan-09 22:21 
GeneralRe: How to Add Carriage return line feed to string (globalization) Pin
Georg Kohler18-Jan-09 19:07
Georg Kohler18-Jan-09 19:07 
GeneralRe: How to Add Carriage return line feed to string (globalization) Pin
Wendelius19-Jan-09 2:02
mentorWendelius19-Jan-09 2:02 
GeneralRe: How to Add Carriage return line feed to string (globalization) Pin
Luc Pattyn18-Jan-09 11:06
sitebuilderLuc Pattyn18-Jan-09 11:06 
GeneralRe: How to Add Carriage return line feed to string (globalization) Pin
Georg Kohler18-Jan-09 13:46
Georg Kohler18-Jan-09 13:46 
GeneralRe: How to Add Carriage return line feed to string (globalization) Pin
Luc Pattyn18-Jan-09 14:00
sitebuilderLuc Pattyn18-Jan-09 14:00 
QuestionProblem populating DataSet Pin
carrigart17-Jan-09 15:55
carrigart17-Jan-09 15:55 
AnswerRe: Problem populating DataSet Pin
N a v a n e e t h17-Jan-09 16:33
N a v a n e e t h17-Jan-09 16:33 
GeneralRe: Problem populating DataSet Pin
carrigart17-Jan-09 17:18
carrigart17-Jan-09 17:18 
GeneralRe: Problem populating DataSet Pin
carrigart17-Jan-09 19:42
carrigart17-Jan-09 19:42 
GeneralRe: Problem populating DataSet Pin
carrigart17-Jan-09 19:56
carrigart17-Jan-09 19:56 
AnswerRe: Problem populating DataSet Pin
Wendelius17-Jan-09 21:33
mentorWendelius17-Jan-09 21:33 
GeneralRe: Problem populating DataSet Pin
carrigart17-Jan-09 22:45
carrigart17-Jan-09 22:45 

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.