VS 2010 Multiple Colors In A RichTextBox?
Jun 17, 2010i'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].....
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].....
How do you do it?
View 1 RepliesI have another application that i'm currently building...
It basically is a "check list" for installed program's, and files. I image machines on a daily basis, and me making this application will save me hours, and hours of time.
[code]...
It's purpose is as follows:It basically is a "check list" for installed program's, and files. I image machines on a daily basis, and me making this application will save me hours, and hours of time.The basics:My program basically has 2 forms. 1st form, will be tabbed with "clients" or, different model of PC's. Each tab will have it's own checklist. I know how to pull external files already, though, that's not my issue.Basically, when I click "check list" button, it searches for an "adobe", and "Labtech" Directory. If it exists, it will throw the result into form2.richtextbox as Adobe is installed, or Adobe is not installed. Also, Checks if the second program directory is there, and then imports the info into form2.richtextbox on a seperate line. My question is, how do I change the color of the text per line?I.e. make Adobe is installed turn GREEN, and Adobe is not installed turn RED ect.
Form2.Show()
Form2.Show()
If Directory.Exists("C:\Program Files\ATI") Then
[code]......
How do you make the word you typed in the Rich Text Box change only the words color? Example:
Example Text
* Hello World
Bye World *
Some more Example text I tried this:
If RichTextBox1.Text = "Hello World" Then
RichTextBox1.ForeColor = Color.Blue
End If
But it changed the WHOLE textbox forecolor to blue. I don't want that, just for the word.
Code to replace the link colors and text colors?Here's the code I found.it works but it only changes the color of one link.I need to change all the colors of all links.[code]...
View 1 Repliesi have a richtextbox and when i paste code from vb, it shows in color but it's a different size than my set font size. how do i change only the font size and not the font colors as well. this code changes the colors to normal black font color.
RichTextBox1.Font = New Font("courier new", 9, FontStyle.Bold, GraphicsUnit.Point)
how can i fix this. so much work to do and so many choices to choose from...
txtSubject1Info.SelectionStart = txtSubject1Info.Find("Hey!")
I am finding specific words in the RichTextBox (in this case, "Hey!") and selecting them by getting their initial position through the "Find" command. Unfortunately, this does not work when I have multiple instances of "Hey!" in the RichTextBox. Here's an example:
Text in RichTextBox:
Hey! This is cool!
The Find command would return a value of 0 in this case. However, let's take a look at another scenario:
Text in RichTextBox:
In this case, the Find command would return a value of 0 again, but I want it to get the initial position of the second "Hey!" statement. I'm wondering how I can do this.
how to have multiple colors in a textbox. Is this possible, or must I use a richtextbox?. I would like to keep it simple if possible by setting it up in a standard textbox.
View 2 Replieshow 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 RepliesI'm basically trying to make a simple, easy-to-use, paint program. I seem to be having problems with using multiple colors in the PictureBox1_Paint option. It draws the graphics but when you change the brush color and click in the picturebox it changes the colors of the previous graphics to the color you are currently trying to use. I need it to allow multiple colors.
Here's the code that I'm currently using..
Imports System.Drawing.Drawing2D
Public Class DynosPaint
Inherits System.Windows.Forms.Form
Private IsFormBeingDragged As Boolean = False
[code]....
I'm basically trying to make a simple, easy-to-use, paint program. I seem to be having problems with using multiple colors in the PictureBox1_Paint option. It draws the graphics but when you change the brush color and click in the picturebox it changes the colors of the previous graphics to the color you are currently trying to use. I need it to allow multiple colors.
Here's the code that I'm currently using..
Imports System.Drawing.Drawing2D
Public Class DynosPaint
Inherits System.Windows.Forms.Form
[code]....
I'm adding themes to my application so that the user can customize colors. What is the best way to store colors in SQL for the purposes of retrieving them and setting control colors in VB.Net? As an integer? The RGB value as a string? (There will be colors involved that don't have names, so I can't go the route of storing the name.)
View 3 RepliesI'm having some trouble with getting my code to scan a specific pixel on my screen for a specific color, and then react when the right color appears. Here's what I'm trying to do:
I have 3 hotkeys. Each hotkey starts a scan for a specific color (lets say #244FA3" ect.) and all 3 searches is looking/searcing for the colors at the same pixel/spot on the screen (lets say x=600, y=700).
Each of the seaches has its individual timer, so the code is actually the same in each timer - it only needs to search for a different color. Each timer is activated by a hotkey.
I just can't figure out how to search for the color at the specific pixel, and then react when the color is found. And it should be fairly fast (search like every 0.1 second after it's activated)
How to save colors to Access Data Base and read them after?
View 1 RepliesI have made a little application for me and my friend to be able to chat with eachother, but now we have some unclear strings as you can see on the image below:
I would like to change for example the username or time date to a color or make it bold, could anyone tell me how to change ONLY that and not everything? I'd love to have such a thing as it makes the whole application way 'clearer'.
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 RepliesHow would I make it so that if someone presses a button, the richtextbox will have more then 1 line of text
RichTextBox1.Text = "Something like this, but 2+ lines"
I'm working on a program that inputs a text box text into a RichTextBox via a button click. But when I click a button, it over writes the text that is already in the RichTextBox. How can I prevent this?
View 2 RepliesI am attempting to hard code a richtextbox that has multiline characters upon the Load_Event. However, whenever I use the "&controlchars.newline _ " I get a syntax error and end of statement expected error.
[Code]...
I know this sounds really bad but I can't seem to figure this out. I am creating a template to use in a form. I have a few buttons that when I click on them will auto type out text into a rich text box. I figured it out for just typing in the text into the richtextbox. richtextbox1.text = "my text goes here" But if I hit the button more than once it doesn't keep adding the text to the rich text box. How can you program a button to enter a text as many times as you click the button?
View 1 RepliesHow to highlight multi lines in Rich Textbox and know which lines are highlighted?
View 8 Replies"HOW TO PRINT RICHTEXTBOX WITH MULTIPLE FONT SIZE AND COLOR". I mean print out hard copy exactly what we see in richtextbox.
View 14 RepliesWhen a selection in WindowsForms RichTextbox uses two or more different font sizes (eg. you select text with font size 9 and some other text with font size 16 in the same selection), SelectionFont.Size always returns 13.
View 2 Repliesi want to change to font size in richtextbox using a combo box its easy to change the font size if we have one font in our selection text using this code.
RichTextBox1.SelectionFont = New Font(SelectionFont.FontFamily, CInt(ToolStripComboBox3.Text), RichTextBox1.SelectionFont.Style)
But if we have multiple fonts in our selection it dose not work. i have another code to solve this problem. But the only problem with this code it is good for less then 2000 chracters but when the selection text is large it is worthless. code is below.
[Code]...
iam using this code to change the font in a richtextbox it's work if user select a single font if there are multiple fonts, and font sizes it dosenot work
[Code]...
And just a FYI, I've spent about an hour looking this up... and I just can't seem to get it to work the way I wan't to. My application is simple, I have a "batch file editor". It has a richtextbox, a couple buttons for Open/Save/Test which are working fine.All I'm wanting to do is...
[Code]...
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]...
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
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