Adding/deleting Line To RTB1 Should Add/delete A Corresponding Line To RTB2?

Jan 9, 2010

Is it possible that when a new line (anywhere in a richtextbox) is added/deleted, then a line is also added/deleted in another richtextbox?

[Code]...

View 3 Replies


ADVERTISEMENT

VS 2010 - Search The Rtb1 For Combobox1 Selected Value And Return The First 9 Characters From The Line With The Result?

Jul 28, 2010

i have form1 with combobox1 and rtb1 i would like to search the rtb1 for combobox1 selected value and return the first 9 characters from the line with the result.

COMBOBOX1
ADRIATIC
AMERICA
APAC-ANZ

[code]....

so if combobox1 selected.value = "BALTIC" then i would like "1209-4756" to become a named string (eg, cda = 1209-4756)

View 1 Replies

VS 2010 Adding New Line & Writing Text On That Line

May 20, 2012

I want to modify a text file. It has a lot of lines of text in it. I want to add a line after a specific line (in the middle on other lines) and write strings there.

The code i have, writes to a specific line but it also overwrites the text on that line:

[Code].....

View 5 Replies

Delete Line From Form Before A New Line Is Drawn?

Apr 21, 2012

I am using this code to draw a line on a form using textboxes as the x and y coordinates. I then click the button with the code below that will draw the line.

Before the new line is drawn, I would like to have previous lines deleted first.

How can I delete these lines?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim canvas As New ShapeContainer

[Code].....

View 3 Replies

VS 2005 How To Delete A Line By A Line Number

Aug 16, 2009

You would think a search for this would show some results but I have had no luck.If I want to delete a line by a line number from a text file, how do I do that?

View 6 Replies

VS 2008 Delete Line Richtextbox If The Line Only Has One Value

Apr 23, 2010

how to delete a richtextbox line, if the line only has one value. Ex:

[Code]...

View 1 Replies

Delete Line By Line In The Datagrid

Sep 9, 2009

i am having trouble deleting the individual rows in the datagrid. That is when the user select this row only this row will be deleted. i am getting some errors at the dataset there. the below is my code to delete from the database:

[Code]....

View 2 Replies

VS 2008 Open A Txt File, Read Line By Line, Decode Each Line Into An Array And Display?

Oct 14, 2011

what i need to do is open a txt file, read line by line, decode each line into an array and display. Now all works ok apart from one line.

sTextLine = objReader.ReadLine() <-- Value of string cannot be converted.

full code here
-------------
Dim objReader As New System.IO.StreamReader(sOpenFile.Text)
Dim sTextLine As New ArrayList()
Dim sText As String = ""
Dim i As Integer = 0

[code]....

View 3 Replies

Read Text From A Listbox Line By Line And Put Current Line In A Label?

Jan 16, 2011

how to read text from a listbox line by line and put current line in a label?

View 3 Replies

Reading A File Line By Line That Within The Line The Values Are Delimited By "?

Dec 1, 2011

How would i go about reading a file Line by Line that within that line The values are delimited by " Example of the data:

"bob" "cat" "1243"
"steve" dog" "6789"

I've started this with this code but not sure how to go about the next stage:

Using MyReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser(My.Application.Info.DirectoryPath & "Records28112011.jd")
MyReader.TextFieldType = FileIO.FieldType.Delimited

[code]....

View 9 Replies

VS 2008 - Writing The Last Line Of .txt Into Textbox - Adding Line From Textbox To .txt

Sep 29, 2009

can somone just post a code of

1. Writing the last line of .txt into textbox1

2. Adding line from textbox to .txt

View 7 Replies

VS 2008 Reading A TextBox Line By Line And Using SubString On Each Line?

Jul 5, 2010

I am trying to read in a TextBox line by line and take the first 7 characters of each line and output everything in another TextBox.This is what I have so far.

Dim line, lines() As String
lines = TextBox1.Text.Split(Environment.NewLine)
Dim i As Integer = 0

[code].....

View 1 Replies

Deleting A Line In A Text File?

Jul 25, 2011

I am doing some txt file programming and i came to the problem...I could write what is in a combobox in a txt file to then read it when the app is opened again.But if i want for example to delete a line in the text file.I want for example if i have in the combobox 1,2,3,4,5 and 6 and i select 5 and i touch a button delete , i want the application to check if the value(5 in this case) is in the etxt file and delete

View 3 Replies

Deleting A Line From Text File Using Edit?

Jun 21, 2010

Ok so i have a uni assignment to delete lines of text out of a text file, so far i have figured out how to search the text file for specific bits of text, i,e name of user, ive also used a loop to find out what line in the text file the specific line exists as...my

code so far is
Dim line As String
Dim Input As StreamReader

[code]....

the selected policy is what im tryin to use to write over the line of texts that already exists however i think that maybe instead of deleteting what exists it will just move it down a line and make a blank line

View 3 Replies

Deleting Spaces - Putting Each Line Into Textbox

Oct 13, 2009

I have this program that outputs all the servers on a specific game. It outputs it to a text file. However, There is a lot of annoying spaces. This is kind of hard to explain, so I'll try to explain it. This is what The text file looks like.

Code:
173.81.220.139 2302
70.26.235.69 2302
24.26.119.209 2302
99.244.109.8 2302
190.234.169.198 27667

As you can see, they have these annoying spaces. What I want to do:
1. Get rid of the spaces, But keep the space between the IP and the Port.
2. After the spaces that are bad are gone, I want the program to output each single IP AND port To its own text Box. It doesn't matter is the textbox of the IP and Port are seperated, It can just be one textbox with the IP and port, with a space between them. Thats about it!! I have the GUI done, and the rest of the programming, all I need now is this.
Reformat without spaces > output each seperate line of text to a seperate textbox > TYTYTYTY

Is there a way for VB to send a command to the command prompt? Say, I wanted it to open a CMD box and send ipconfig into that box, what would that be?

View 2 Replies

Drawing And Deleting Line On MouseMove Event?

Jun 21, 2010

I'm writting program in VB 2010, but I have a problem. I want to draw a temporary line on PictureBox control MouseMove event. That works fine but deleting of that line doesn't work. I tried to draw the white line on the same coordinates (PictureBox's background is white), but won't work.

Here is the code: Private Sub drawing_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles drawing.MouseMove

[Code]...

View 7 Replies

Reading File Into An Array And Deleting A Line From It?

May 1, 2009

I have gotten farther along in my work, and the "add friends" works great Now, I am working on deleting friends. I have the following snipplet from my code:

[Code]...

View 1 Replies

VS 2005 Stream Writer And Deleting A Line?

Apr 21, 2009

What is the code to make a stream writer remove a certain line from a file stream?

View 1 Replies

Deleting A Text Line In Windows Forms Project

Jan 10, 2011

I am busy with a project converting VS2005/2008 sln files.

I am quite far but have came acroos a problem with my source code.

I have found the files I need to change, I have changed them to the version that I need.

I now need to read the files back into my program and delete the line I have changed as it contains project numbers that are irrelevant. Then I need to save it.

I have got as far where I have searched for lines that begin with 'Project'. I have changed this also so it's now a question of reading the files in, Deleting the line with the 'Project' number and saving them.

[Code]....

View 1 Replies

Searching A Text File Then Deleting That Specific Line?

Mar 15, 2012

I know how to search a text file for a specific line, but what I don't know is then how to delete that line?My text file is set up as such:

021,Donovan,56 Eynesford Crescent,Bexley,SE5 1TR,09/08/1967,13 March 2012,Bronze
062,Fredrikson,6 Freil Road,Gravesend,GR9 TRB,12/06/1995,13 March 2012,Silver

So I know how to search for the 3 character integer at the beginning of each line, but how do I then delete this line?

I'm currently using this code

Imports System.IO
Public Class Form6
Private Sub SearchBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchBtn.Click

[code].....

View 3 Replies

VS 2008 - Deleting Spaces, Putting Each Line Into Textbox

Oct 13, 2009

OK, SO i have this program that outputs all the servers on a specific game. It outputs it to a text file. HOWEVER, There is a lot of annoying spaces. This is kind of hard to explain, so ill try to explain it. This is what The text file looks like. [Code]

As you can see, they have these annoying spaces. What I want to do: 1. Get rid of the spaces, BUT KEEP A SPACE BETWEEN THE IP AND THE PORT. 2. After the spaces that are bad are gone, I want the program to output each single IP AND port To its own text Box. It doesn't matter is the textbox of the IP and Port are separated, It can just be one textbox with the IP and port, with a space between them. Thats about it. I have the GUI done, and the rest of the programming, all I need now is this. Reformat without spaces > output each separate line of text to a separate textbox > TYTYTYTY

PS, is there a way for VB to send a command to the command prompt? Say, I wanted it to open a CMD box and send ipconfig into that box, what would that be?

View 4 Replies

Reading Line By Line Txt And Preview The Line In Textbox?

Sep 16, 2010

i need the app to preview the line in textbox in timeintervalof 1 s (can be change)nd when it will reach to the end it close the text file and andreread it after let say 1 m ..

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim myStream As Stream = Nothing

[code].....

View 17 Replies

VS 2008 Deleting A Line In A Text File That Ends With A Certain String?

Jun 12, 2011

ine from a text file. This is for an ASP.net Webpage. I will have a file called ources.txt. Example data of this file looks like this:

View 3 Replies

VB2008 Deleting Spaces, Putting Each Line Of Text Into Its Own Label Or Textbox?

Oct 13, 2009

OK, SO i have this program that outputs all the servers on a specific game. It outputs it to a text file. HOWEVER, There is a lot of annoying spaces. This is kind of hard to explain, so ill try to explain it. This is what The text file looks like.

173.81.220.139 2302
70.26.235.69 2302
24.26.119.209 2302

[code].....

View 13 Replies

Delete Duplicate Line?

Dec 15, 2009

I have lines like this in my text file

10.0 28 Blue (B1-T54 ) [1 01.69 65.4] 47234 -22234 181017 76921
6.5 28 Blue (B1-T55 ) [1 01.80 50.2] 48234 -21234 203852 76133
11.0 28 Blue (B1-T56 ) [1 01.80 64.9] 48234 -22234 181804 76133

[code].....

View 3 Replies

Delete Last Line In A RichTextBox In .NET?

Apr 1, 2012

I've been search and I can't found an answer that works, I need to remove (delete) the last line in a RichTextBox1 in vb .net, I mean remove last line and 'breakline' too, but only the last, no others,

View 1 Replies

Delete Line 1 From Listbox?

Feb 23, 2009

how can i delete line 1 from listbox?

View 13 Replies

Delete Line After Sending It

Mar 16, 2009

ok i have a textbox that look's like this [code]say my code grab's the word EON & ERN & HEN and send's it to 1 of my textbox's/i need those deleted so they cant be sent again to my textbox.[code]

View 3 Replies

Delete Line In TXT File But Keep Everything Else?

Mar 23, 2011

I am trying to figure out a way to delete something inside a text file but keep everything around it.[code]....

View 4 Replies

How To Delete Line From TextFile

Jan 11, 2011

I'm making a function that is supposed to delete a line from a textfile "test.txt". I'm having no problems with finding what line i want to delete. The basic idea is this: read the whole file with streamreaderdelete the linerewrite the file with streamwriter. My problem is the last, how can i completely remove the file content, and write another string in it, writer.writeline just appends a line.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved