VS 2010 Richtextbox Colorizing?
Apr 6, 2011
im trying to make my richtextbox colorizing, its like visual basic coding text, where public, there its blue, where dim there is blue and etc... Im using this
Dim mystring As String = "html"
If rtb.Find(mystring) >= 0 Then
Dim my1stposition As Integer = rtb.Find(mystring)
[code].....
View 2 Replies
ADVERTISEMENT
Apr 13, 2012
I have a class library with a component class in it. Everything is in VB.NET. It's only one file so you can see it here [url].. On line 92, there is the OnTextChanged Sub. I was thinking about adding ProcessAllLines() (as on line 128) to the end of that Sub, and it worked. However when I was typing in code to the RichTextBox (source which I used is here [url...) after each text change it was checking and processing ALL the lines. So I deleted ProcessAllLines() in the OnTextChanged Sub.[code]...
View 3 Replies
Jan 28, 2011
For some reason while using syntax highlighting, my RichTextBox flickers alot.
Public Shared Sub SHSet()
Dim words As New List(Of String)
If ScriptEditor.RichTextBox1.Text.Length > 0 Then
Dim selectStart As Integer = ScriptEditor.RichTextBox1.SelectionStart
ScriptEditor.RichTextBox1.Select(0, ScriptEditor.RichTextBox1.Text.Length)
ScriptEditor.RichTextBox1.SelectionColor = Color.White
[Code]...
View 1 Replies
Sep 11, 2010
I need my app to enter each line of a richtextbox for a different field in my webpage.
Currently what iim thinking is:Get string of first line in RichTextBox Enter string into webpage Delete first line in RichTextBox loop
View 2 Replies
Apr 22, 2012
When i write a url in a rich textbox it automatically takes the link style (underlined blue font). I want to know if it possible to make it clickable. I mean to open the url in the browser when i click on the link.
View 2 Replies
Jun 26, 2010
I am following this threadbut when I print the page is blank. Even though there is text in the RTB. What am I missing
View 5 Replies
Aug 19, 2011
I have a program that appends text to a richtextbox.I do it like this :RichTextBox1.AppendText("[" & Now.ToLongTimeString & "] <" & Username & "> : Hello World !" & vbNewLine)
I know the username.Now, I searched google to color the username (the text between '<' & '>').It works, for the first line at least.As soon as I add another line, only the first line stays colored.How would I do that so it colors every line?
View 15 Replies
Apr 9, 2011
I've developed a MySQL chat app that I have in my program. It works perfectly, however all of the text is the same color. I use a silver-on-black scheme. I'd like to do 1 of 2 things, whichever one is.. er.. "more possible". The first option would be simple - alternate each row's back color. So that one row would be silver-on-black, the next row would be black-on-silver, and so on alternating. Each row is separated by a "vbCrLf". The second option would be to merely bold or turn to white the info text. Here's the format of the chat messages: [{time} - {user}] {message}. I would want [{time} - {user}] to be bold and white. Are either of those 2 options possible? Well, I know they're possible
View 1 Replies
Apr 29, 2011
When setting the selection of a RichTextBox, the selected text is highlighted even though I set the HideSelection property to True. Once the RTB loses focus then the selected text is no longer highlighted. Programatically setting the focus to another control doesn't hide the selection, only physically clicking another control will hide it. So is there a way I can make the RTB not show the selection right from the start?
View 2 Replies
Nov 2, 2010
i've a question: in a form i've a combobox that inside it are lots of names, and beside it i've a RichTextBox with a text that is generated when i click a button in this same form...using a phrase to examplify the text that i'm talking about, "soccer is the best sport in the world" and inside the combobox i've "soccer/football/golf/tennis" then i would like to know what code i should use to the same text that was generated, substituting only one word, and that word must be the word contained in the corresponding combobox...
example: in RichTextBox i've "soccer is the best sport in the world", then i pick in the combobox the world "tennis", i want a code that after i click the button, transform this phrase to "tennis is the best sport in the world".
View 1 Replies
May 27, 2011
I've been trying to figure this out lately by looping a richtextboxfinds code replacing the integer with a value -1 than the integer before it after the starting string in that code. But for some reason I can't get it to loop through my text upwards.
It loops down through the text fine, however i'm not satisfied with that loop either, it seems a bit buggy.
[Code]...
The down search seems to take 2 clicks on my button handler to actually change the selected text that it finds, and then I used the code for an upward search, it would search one more down upon pressing my "search up" button, before not doing anything after that on the next click. So i'd assume something is wrong with the down search function as well.
View 5 Replies
Mar 21, 2011
I'm trying to read the lines of a richtextbox into a string array but no matter how hard i try i keep getting a stackoverflow exception. This is what I currently have (Notes is the name of my Richtextbox):
Dim newarr() As String = Notes.Lines Before that I tried:Dim newarr() As String = Notes.Text.Split(Environment.NewLine) And also: Dim newarr() As String = Notes.Text.Split(vbCrlf)Nothing I try is working!! Where am I going wrong??
View 6 Replies
May 19, 2011
My goal is to create an email in my application and send using outlook. I have used robdogs tutorial to create the outlook message which works great. The problem I am having is taking the text with all of the formatting from my richtextbox and putting it into the email body while maintaining the formatting and such.I have tried using some textranges to get the text but I can't seem to pull the formatting. Does anyone know how I can easily get all text and formatting and put it into an outlook email?
View 1 Replies
Mar 18, 2011
i make a
TextBox1.Select()
TextBox1.Paste("hello")
This code write "hello" in the textbox1, how make in the RichTextBox = ?I write
RichTextBox1.Select()
RichTextBox1.Paste("hello")
and dont work.
View 2 Replies
Mar 8, 2011
I'm trying to have a feature in my application where every time the user presses the "-" key the word directly before it becomes bold. This much I've been able to figure out:
[Code?
View 4 Replies
Aug 21, 2010
there is any way to change the caret? (no the Cursor icon but the vertical little bar at the typing position)
the caret is really very tiny and I like to have option to change it to an yellow block, an red blinking underline or so.
View 3 Replies
Jun 12, 2011
I'm trying to make a way for them to export orders to a .rtf file. In order to preserve formatting (bold, underline, etc.), I'm creating a RichTextBox (through code) and formatting the text appropriately. To save the output, I'm simply using the RichTextBox.SaveFile method. Now, to list all of the products that were sold in the order, I'm deriving the information from a ListView. The ListView contains the product name, product price, and quantity sold of that product. I cannot find a way to list the output in a table-like structure, so I tried making a DataGridView and pasting it onto the RichTextBox. Unfortunately, this didn't work at all, so I was wondering if anyone had any ideas as to what I can do. I can't simply use Tabs to space out the information because it doesn't get formatted nicely.
View 2 Replies
Jun 7, 2011
I have some text displayed in a richtextbox from an xml. This is how is shows upHaste <i>(As soon as it comes under your control.)</i>At the beginning of the end step<i>The storms of the wastelands form quickly and hit hard. Few have anything to do with rain.</i>
View 1 Replies
Jan 7, 2011
I've decided to come back to working on an old program of mine, and it's been coming along nicely, but there's this one thing that I can't get working.I have formatting options (Bold, Underline, Italics, Strikethrough) available on my program, and they all work properly. I'm giving users the ability to export all of their text from a single page on the program to a .rtf file. However, the problem I'm experiencing is that each page has numerous RichTextBoxes on it, so I cannot simply use a RichTextBox1.SaveFile() command or something similar. I want to compile all of the text (including formatting) from all of the RichTextBoxes and put it on a single .rtf file. Currently, I'm getting the text from the RichTextBoxes using the RichTextBox1.Text command; unfortunately, that only gives me plain text without formatting. So, what I'm wondering is: how can I get the formatted text from a RichTextBox? Is there any command?
View 6 Replies
Apr 6, 2011
I am trimming some lines in a RTB so I am putting the line into a string, changing it and then I want to replace the old one.[code]And when done simply replacing the original text with the fixed one.But id still like to know how to do it without this method.
View 1 Replies
Jun 17, 2010
i'm building an app for COD MW2 and i added an feature that load the color code of COD Example
^1Text
Text
^1Text^2OtherText
TextOtherText
[Code].....
View 6 Replies
Oct 20, 2011
I have a richtextbox in the form1 and I textbox in the form2 with a text example "hi, have a nice days" so I need to save this text into the richtextbox. So I need code in a button in the form2 for to save the text into the richtextbox in the form1.
View 8 Replies
Feb 4, 2011
I want to print the contents of my RichTextBox1.Text how can I do this?
View 1 Replies
Mar 2, 2012
If I set the Text property of a RTB to a string that has CrLf's in it, it seems the RTB reduces the CrLf's to a single character & screws up the positioning to set the SelectionStart property.So, for example, if I know the position of a character in the original string & I set the Selection Start value to that position, the selection highlighting will be off by 1 character if the start position is preceded by a CrLf & off by 2 characters if preceded by 2 CrLf's, etc.So how can I determine the correct position to specify my SelectionStart value?
View 2 Replies
Aug 17, 2011
I made my irc client. It sends & receives to a richtextbox like this :
Well, you might know mirc or nns, there it is like this :
How can I do it the same, so all the text is at the same place, under eachother, like on the second screenshot.
& another question : How do I color words in a richtextbox ? I tried Selectionstart = Find("blablabla")& selectioncolor = color.red
but that selection dissapears when someone send a new comment.
View 1 Replies
Sep 6, 2010
I have the following
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
Dim words As List(Of String) = New List(Of String)(New String() {"select", "insert", "delete", "truncate", _
"from", "where", "into", "inner", "update", "outer", "on", "is", "declare", "set", "use", "values", "as", _
[code]....
The only problem is that if I type one of the key words, the word highlights, but if i type a word with one of the key words within it, part of it gets highlights as well.Example:
drop
dropped
View 24 Replies
Apr 16, 2011
i want user when clicks a button to show a selection around a richtextbox and not inside it selecting the text... what i have right now is this: richtextbox1.focus() that will indeed focus the richtextbox but the problem is, it only selects its text content.
What i want is something similar to a Yellow or Blue Square showing around the richtextbox i want to "select", so the user will properly notice the richtextbox more easelly.
i tried messing with the vb express rectangle stuff but i cant get it to draw over all objects, its actually always displaying below all objects in the forum
EDIT: ive also tried using a tiff picturebox with a drawed empty rectangle on it, but the dreadish thing when put over other objects like textboxes, it simply just displays the color of the form emitting any other objects in between, setting the background color to transparent under web colors had the same problem...
View 9 Replies
Jun 8, 2012
I had a richtextbox1 contains the following text:
<REPLY username =chicco1502
status = OK
user_id =3377436 >
<user_register.php: 2011-02-19 10:00:06
POST
username=edwardzhao
[Code] .....
So once I click button1 it should extract only Email plus Password into
Email: Password
edwardzh*2@hotmail.com:640716
gabriele.sc*hi@email.it:010585
So the email symbol is email= <email that should be extracted here>
and so the password sympol password= <password that should be extracted here>
Source code [URL]
View 3 Replies
Jan 28, 2011
I am trying to implement a feature that would allow me to move the cursor to the end of a line in a Rich Text Box. Is that possible?
View 2 Replies
Dec 17, 2010
I'm trying to make a tool that supposed to do the following.
When I type i.e. the number 12345678 in TextBox1 and click on Button1. The number should go to RichTextBox1 on a new line with the text:
There Are 12345678 Bannana
Now, when I fill in at TextBox1 12345679 and click on Button1, a new line should be added to RichtextBox1, making it:
There Are 12345678 Bannana
There Are 12345679 Bannana
And so on...
What ever I try I cant get this to work,
View 9 Replies