Cannot Save Text In Rich Textbox If On Multiple Lines?
Apr 15, 2011
here is the code i am using to read from a rich textbox:
Dim mydir = my.computer.filesystem.currentdirectory
IO.Path.GetFileName(mydir + "
ecord" + tb_name.Text + ".txt" )
Dim linebuffer() As String = IO.file.ReadAllLines(mydir + "
ecord" + tb_name.Text + ".txt")
casefiles.rb_casefile.Text = linebuffer(0).Trim(""""c)
View 14 Replies
ADVERTISEMENT
Apr 12, 2012
I am trying to open up a text file that contains some text. I have 3 text boxes on my screen. What I need to figure out is how to replace multiple words (1 in each textbox) with text it finds in the txt file.
I can do this by using the single find / replace feature but I'm trying to be able to fill out the 3 textboxes and then click my find / replace button to have my Regex find each predefined word and replace it with what is in the text boxes.
Here is my code to get the find / replace one word at time feature. I've tinkered with this to just add more variables to my Regex but it doesn't seem to work.
[Code]...
View 5 Replies
Nov 3, 2010
I'm trying to read a text file with multiple lines and then display it in a textbox. The problem is that my program only reads one line.
Imports System.IO
Imports Microsoft.VisualBasic.FileIO
Public Class Form1
[code]....
View 2 Replies
Sep 3, 2009
how to count the lines in textbox1.text (with multiplelines). I don't need to count each character. I only need to count each line from top to bottom in textbox1.text (multiplelines) and I will use Label1 to display the numbers.
example:
1-pauljaones
2-tommyperrry
3-marktoms
4-Jonessmith
5-paulwhite
Obviously this is 5 lines and that's what I need to count.
View 12 Replies
Aug 22, 2009
I am looking to add individual lines of user inputed text into a rich text box. I've been working with .text and .appendtext however I can't assign individual lines of text.[code]...
View 4 Replies
Jan 16, 2011
the question says it all, doesn't it? I was just wondering if it was possible to get only the displayed lines of text in a textbox. (Such as line indexes 1-15, to give an example.)
View 10 Replies
Feb 10, 2011
how do i replace all new lines in a rich text box to </br> ?
View 1 Replies
Mar 21, 2012
I'm creating a program that pings a host. I'm trying make text appear RED on one line if it's down, and GREEN if it's UP.
View 6 Replies
Jun 5, 2011
I've out an output rich text box called TbxOutput, and I have many different tbxoutput.appendtext("") methods in my program.I don't really know much about how to set rich text box colors, and what I specifically need is for a simple line of code that i can plug in before the tbxoutput.appendtext("" + vbnewline) methods to make that particular line output text of a different color.
For example, when my program normally outputs messages it does it in black, and i want it to remain that way by default. But when it outputs an error message, I want that particular message
View 2 Replies
Aug 31, 2010
I have 2 panels set up, one contains the rich text box the other one contains a single label. The am currently using the following code however it is not working.
Dim line_count As Integer = mainEditor.Lines.Length
Dim linecounter As Integer = line_count
linecounter += 1
line_count = 0
[code]....
View 6 Replies
Aug 16, 2011
[url]...And i want to do this to multiple text boxes.. like 50.
View 1 Replies
Feb 18, 2012
i need to take data input from a textbox such as this
[Code]...
and get it so i push a button and it seperates it out so it adds and looks like this inside a display field
[Code]...
View 6 Replies
Jan 11, 2012
Currently using code below on a button click event to save the contents of a rich text box:[code]tbMix combines the text of tbFileName2 and tbScriptName to create a file path which is the file that the rich text box is created to.however, when i format things in the rich text box, eg as bold etc, and then reopen the contents of the file, the formatting has not been saved.
View 3 Replies
Feb 2, 2010
How in the world do i save/open a rich text file (.doc .txt or other) that can work in a Windows Forms Project. They should be able to click a button to open, and one to save. How do i do this?
View 2 Replies
Mar 30, 2010
I have tried the internet and I got this [code]...
So Please help me I have spent 3 days on the internet searching and I have finally came here. I am using Visual Basic .NET 9 if you want to know.
How many linux users does it take to change a lightbulb?
View 4 Replies
Jan 20, 2012
This is declared at the top:
Dim savedUp As Boolean = True
I've got a rich text box where the user edits text.
Private Sub tbUpperBody_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbUpperBody.TextChanged
savedUp = False
[Code]....
View 7 Replies
Jun 3, 2010
I have a programme like word and wanna concert the content of the rich text box to pdf and save in the disk?
View 3 Replies
Mar 12, 2010
I want to be able to save anything the user typed in the rich text box in my form into a .txt file in a location of their choosing after using the 'Save' option on the menu.[code]...
View 6 Replies
Apr 5, 2010
I have a rich text box in my form, and formatting will be applied to the text.
I need it to save the text with its formatting as a string (to be entered into a database)
My problem is, my current code only takes the text unformatted, so when the form reloads, the text is plain
View 1 Replies
Apr 15, 2009
Basically I want to save the contents of my RTB (Rich text box) to a .txt document.
View 7 Replies
Feb 19, 2012
how to change fonts/colors/sizes and stuff from line to line inside of a richtextbox. Because whenever I try, a beginner, I always make the entire richtextbox change colors/fonts/sizes etc, rather than just a single line. So mainly... i just need to know how to change primarily colors for my chatbot guy and the user. :"We are what we repeatedly do. Excellence, therefore, is not an act but a habit." Aristotle
View 4 Replies
Jun 20, 2010
have more than one text color in the Rich Text Box, because when I highlight one word and use the color changer, it changes ALL of the words in the text box, and I want to know how to be able to have a specific word, or words, be a different color.
View 13 Replies
Mar 9, 2011
How do I do text formatting in a Text Box? I want to bold a selection on a textbox without affecting the rest of the text. HOw do I do this with Textbox and RichText formattting?
View 1 Replies
Jan 30, 2012
i've got my basic AutoTyper ready (well and one with autoupdating etc in it) but it's only a singular line. [Code] What I want to do it to type multiple lines, I know I'll have to enable multiline on the TextBox. I want it to type one line per time interval using 1 timer. I don't know how but I know it would have to count the lines but from then on I'm stuck. I will need to make it type line 1, then on the next loop line 2 and go on until it's reached the amount of lines from the count then repeat from line 1. [Code]
View 6 Replies
Feb 4, 2011
How to make the selected text in a RichTextBox Bold,italic,underline ,change its color to red, Font to "Lucida Sans Unicode" and Text size to 18pt.
View 1 Replies
Sep 14, 2010
I have an application that allows the user to define text in a rich textbox. I would like to give the user the ability to define text for one or more languages. I don't think this will be a problem using the rich textbox as it allows for unicode characters and DBCS (please let me know if this is incorrect). My question is, I display this text throughout the app in other controls as well, such as a listbox, label, etc. by acquiring the RTF's Text property (plain text). Are there problems with other controls displaying unicode/DBCS characters? I realize that I may have to toggle the font of the control in question depending on the language (I will allow the user to specify a default font per language).
View 2 Replies
Jul 24, 2010
[code...
When I use this code I get the error "Property 'Chars' is 'ReadOnly'."
View 9 Replies
Nov 9, 2011
its just doing an editor of .net .where when you type like
vb
Public Class Form1 End Class
the text on the textbox or rich box will have a colors
View 2 Replies
Dec 27, 2011
I'm using a Rich Textbox in my vb.net application on update form to take address value. My update query is generated at run time looping through the textboxes on the form and checking which fields have got some value and the corresponding fields are updated in the database. For Each x As Control In Me.Controls
[Code]...
View 1 Replies
Mar 25, 2012
I am working on a utility to reformat a text file. Working on language to remove duplicate record entries. However there are desirable ("keeper") duplicates and then those I want to remove. I handled the problem by temporarily assigning a unique number to each @D line, then stripping them off after I've removed duplicates. So far so good, except in removing unwanted duplicates I have an extra of the "keeper" duplicates left that doesn't get removed. See below. I am wondering if there is a way to search for a line in a textbox starting with a certain character, but is also proceeded by 2 blank lines and followed by 1 blank line. CODE IM USING TO REMOVE DUPS yet keep formatting with blank line separators, etc.:
[Code]...
View 5 Replies