Why does the following code produce a single string in a richtextbox and the multiple strings that it is supposed to with a regular textbox? I am concerned about running out of space sizewize so I am trying to get away from a textbox.
Dim updatedHours As New ArrayList
For Each item As String In RichTextBox1.Text.Split(vbNewLine)
Dim linepart() As String
Dim oldTimeIn As Date
Why does the following code produce a single string in a richtextbox and the multiplestrings that it is supposed to with a regular textbox? I am concerned about running out of space sizewize so I am trying to get away from a textbox.
Dim updatedHours As New ArrayList For Each item As String In RichTextBox1.Text.Split(vbNewLine) Dim linepart() As String
I am making a html editor in visual basic 2010 for Uni and i am coming across some problems.
I'm using the richTextBox because it is more editable for what i am doing. The first of my questions is: How can I change the colour of text.
What I have done so far is add a timer that will constantly check to see if the user has entered... lets say "<div>" then i want that text to change to a different colour... say red.
My second question is: Obviously in web dev when you write the <div> tag you have other content inside it like: <div id=""/> so how can i make the entire string between the < and the > or the <div> </div> become the same colour.
I'm trying to format a string so that when it's put into a RichTextBox, the bold, italics, etc... will be interpreted correctly. I found an example that shows the following string[code]....
I am writing a little app for the kids at a local kindergarden and I have some trouble with my code. I have a RichTextBox containing several times in the text the name John. I want to replace randomly the name John with other women names like below
So I have this:
Public Sub Replacements() RichTextBox1.Text="John goes to the car and leaves. John it's taking a nap. Since John works late so (s)he won't be home for dinner. John loves the kids and the kids love John and made a really nice picture"
I want the strings of RichTextBox1 and RichTextBox2 (strings are separated by newlines) printed to RichTextBox3 along with selected RadioButton's name and ticked CheckBox's name.[code]
I have situation where I have to retrieve different fields from Access Database and put into one RichTextBox but they have to be displayed as DIFFERENT font types/colors.
I am able to get the database field data into RichTextBox but not able to set font styles or font colors. They are displayed in default font style. Please help me with sample code by giving example, i.e., taking two to three different string types and sending them to RichTextBox with different font color and styles.
just want to know what is the difference between these date values?Once some one told me that its difference is server date and client date but not sure which one he meant.Below is 3 type of date currently I'm using and don't know what is the difference between them.
DateTime.Now is from System.DateTime.Now Now is from Microsoft.VisualBasic.DateAndTime Today.date is also from System.DateTime
Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?
I am creating a Simple Publisher Application in which I need to insert texts in different textbox from an array of strings .I have coded it like this .
Dim texts(40) As String 'Array of strings to be inserted shpTextBox = appPub.ActiveDocument.Pages(pageIndex).Shapes.AddTextbox _ (Orientation:=PbTextOrientation.pbTextOrientationHorizontal, _[code]......
Now It only populates first text box with the first string in the array (For 0th index) and rest textboxes contains empty strings ,though texts array has values.
I'd like to learn how I can add a bunch of strings into the AutoCompleteCustomSource property of a TextBox. Actually that doesn't seem to be possible.. What I actually want to do is to make the textbox suggest and append 7000 strings. I can do suggest and append stuff already but AutoCompleteCustomSource can contain a limited number of strings, so I have to find another way to add my strings.
I'm making a random sentence generator that takes subjects, predicates, etc. from user input, stores them, and then randomly chooses one value from each category and prints it in a textbox. Or at least, that's how it's supposed to work. But I just can't seem to get the text to print in the textbox. Everything compiles fine, but when I click generate, Windows gives an error.
Since I have barely any time, for it is a project at an enrichment course that ends in 2 days, I've been trying everything I could without taking too long.[code]...
So I have software to replace string with string, it's cool but I need code which would replace any given character (for example a) with all strings from textbox.
I am having trouble figuring out how to parse a string with delimiters. I have a text box which the user inputs data or what ever. I need to figure out how to parse the string and display it in a listbox, each word in a single line. Here is what I have so far, my book doesnt explain parsing very well and I'm stuck
I want to post the textbox1 strings into the &username in the php textbox and also to post the textbox2 strings into the &password in the php textbox then click the submit button.
Here it is the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MessageBox.Show("Please enter your username")
I've build a list of Strings from files. The list itself is working fine (tried it by having ListBoxes and other controls loading its items from there just to make sure that this is not the issue). Now, I am using this list of strings to compare a Text in a TextBox1 while typing to determine if this TextBox1.Text already exists in the list. I am using the following code (where "s" stands for my List items):
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If TextBox1.TextLength < "1" Then Button6.Enabled = False ToolStripStatusLabel1.Image = My.Resources.pic_Add_Warning ToolStripStatusLabel1.ForeColor = Color.Red [Code] .....
Where Me.Note is a string that I am looking for and replacing it with the contents of txtNote.text. And then storing it all back in the string CoverPage.CoverPage is an rtf string that will holds place holders for the text I want to change.(That works) But when i update the note that may have a carriage return in it, the coverpage does not reconize the carriage returns comping from the Multiline textbox when its displayed.I have tried replaceing Enivronment.Newline with vbCr, vbCrl and whatever else I can think of. is there an issue with taking a string carriage control and tranfering it to a rtf carriage control?
Basically I have a series of lines in a textbox like this:
### = 1232, 1234, 1236, 1238, 123A, 123C ; comment here I want to show a button when the caret (cursor pipe thing) in the textbox goes is in a number so like:
... , 12|31, .... or ... , 123|1, .... etc (the pipe being the caret)
I have written code to check if it is in a number and to get the number when the button is clicked, but it doesn't work correctly if I put the code in the selection changed event.
oh and the numbers can be upto 8 digits long and hex.
Quite simple but I'm having the hardest times trying to write something that'll do what I want. I have 1 listbox with 3 pre-defined strings each in their own index. I'm trying to search through a textbox to see if any of the strings in my listbox were found. So far I have no compatible code so I seek help from the professionals.
I'm attempting to create a small app that allows a teacher to input 5 students with 5 test scores each. I need to create arrays of strings to hold the five students names, an array of five strings to hold each student�s letter grade, and five arrays of five single precision numbers to hold each students set of test scores.
I Want to know how to insert a textbox into a richtextbox...
In my code, I have a line of code that allow me to display the content of a richtextbox into the header of a datagridview[code]...
I get the information content into the control and display it, but this actually is static (the information), I want to take some lines of text directly from my database and display it into a textbox, but I need the textbox to be embed into the richtextbox.
I have a richtextbox and I am adding text to the rich text box programmically using RichTextBox1.AppendText(Environment.NewLine & "The red fox jumps over the" I have a variable called "myvariable" How can I program my button to type the text above and then insert variable's value in one line? Example: Let's that myvariable = "moon" How can I code my button to say "The red fox jumps over the moon"
I'm trying to build a sales program in which by adding multiple items in a RichTextBox, with the click of a button, the program can sum the price of these items and put it in a TextBox as the total sum of these values.I've been going nuts about on how to write the code for this..It's the last part of the program that i need to conclude ir.