VS 2010 Searching Up Through Richtextbox (not Down)?
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
ADVERTISEMENT
Jan 17, 2012
I have a listbox with multiple items:
Quote:
The Sopranos (Season 5) Boxset (DVD)
Braveheart (DVD)
MTV The City - Complete Second Season 2 (DVD)
I have a TextBox where a user enters a search:
The Sopranos Season 5 Since ListBox.FindString() wants a String and not a RegEx, I can't use a Regular Expression. (right?) So, if TextBox.Text = "The Sopranos Season 5", then ListBox.FindString(TextBox.Text) will not find my entry with "The Sopranos (Season 5) Boxset (DVD)".
View 3 Replies
Jan 31, 2012
Write a program that requests a color as input in a text box and then determines whether or not the color is in the text file. The program should use the Boolean-valued Function procedure IsCrayola that returns the value True if the color in the text box is a Crayola color.
Public Class Form1
Dim colors() As String = IO.File.ReadAllLines("colors.txt")
Dim IsCrayolaAnswer As Boolean = IsCrayola(colors)
[code].....
View 17 Replies
Feb 29, 2012
I want to search for a specific string within a text file, however instead of hard coding these string values into the system is there any way I can have them within an external file such as a text file and have these values that are to be searched in there and then pull them from there?
View 2 Replies
Apr 1, 2011
I know the sort of a thread is already here, but I have a different question. I have ListBox1 and TextBox1 and the Items of ListBox1 are:California
Chicago Washington and as I start typing the text into the TextBox1 (TextBox1_TextChanged), then it will select the first Item in ListBox1,that is closest to the text in TextBox1:
For example:
If I type "A" to the TextBox1, it will select California (California)
If I type "C" to the TextBox1, it will select again California (California)
If I type "CH" to the TextBox1, it will select the Chicago (Chicago)
AND!!! If I type "SH" to the TextBox1, it will select the Washington (Washington)
so it won't only search the first letters, but it will even search the letters in the middle of the text, too.
View 4 Replies
Oct 22, 2011
I am trying to search and XML file for a variable on a specific node. Following a tut I can setup a search for the node correctly and it returns its name - but it doesn't find any values for any children of that node.
I get this error:
Faster_2 is neither a DataColumn nor a DataRelation for table Skill. Area Highlighted:
ListBox1.Items.Add(dv(index)("Skill_Name").ToString() & " " & dv(index)("Faster_2").ToString())
Here is my VB
[Code].....
View 2 Replies
Mar 4, 2011
I need to search a keyword put in a text box. In my case, I want to search records by the month name. I would want a command button that displays results according to the keyword typed in a text box. Now I tried two methods, one with a text box, one with a query. Both Do search, but the fields return empty.
Heres the code for my form where the datagrid is:
vb.net
Public Class Form6
Private Sub Pay_CalculatorBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Pay_CalculatorBindingNavigatorSaveItem.Click
Me.Validate()
[Code] .....
I want to display summaries of data entered, by criteria, like by department, by month, by year etc. How do I do that one? I have vb 2010 express.
View 2 Replies
Aug 24, 2009
Is there an easy way to search through a List(Of Integer) and find duplicates? Or do I need to do loops to search through it with each number, comparing it to each one?
View 3 Replies
Sep 19, 2011
I am coding on Visual Basic 2010 and need some My Access database table has following information:
FirstName
LastName
PhoneNumber
Basically what I am trying to do is create a Search function where the user will enter a First and Last Name in the search boxes and upon hitting the ''Search'' button the program will look through the database and check if the records exists.
If the record does exist then I want the Phone number to appear in a separate textbox which is named txtPhoneN. I have included the code I use to connect to the Database. I have already managed code the part to Add new record to the database.
[Code]...
View 1 Replies
Nov 25, 2011
Does anyone know how to do this? I'm stuck on a boat right now out to sea(Navy) and don't have access to vb.NET, its in my berthing...
So someone clarify this code and see if it works?
Dim index As Integer = list.FindIndex(Function(value As String)
Return value(0) = "STRING HERE"
End Function)
View 1 Replies
Sep 27, 2011
So after my script runs a batch file it executes the shell command:
adb shell dumpsys cpuinfo > sample.txt
which then if you open sample.txt you see this:
[code]......
View 20 Replies
Mar 27, 2012
I have a requirement to search large piles of text for keywords
The "keywords" are known in advance - but the number is variable.
The text is large - I've had 50000 byte strings in tests already...
View 22 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 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
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
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