473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

search a text box by character length in Visual Basic

I have richtextbox1.text (that shows a list of items). I would like to
search that box for the same number of characters and show the results
in another text box (text box 2)




Expand|Select|Wrap|Line Numbers
  1. For Each item As String In RichTextBox2.Lines
  2.  
  3.         If item.Length = "\w{80}" then
  4.  
  5.                ' do not now what to do ????
  6.  
  7.         End if
  8.  
  9.     Next
  10.  
  11.  
  12.  



Here is a image of what i am asking:

Feb 12 '13 #1
3 1527
Rabbit
12,516 Expert Mod 8TB
Please attach the image to the thread itself. Most image sharing sites are blocked by our firewall.

Also, this is not a code writing service but if you post the code you've tried along with a description of the problem with the code, we can help guide you to a solution.
Feb 12 '13 #2
Mikkeee
94 64KB
Coreyhis, something is strange here. You have an image of a VB6 form but your code is VB.NET. What dev environment are you actually using?
Feb 14 '13 #3
Killer42
8,435 Expert 8TB
It sounds as though the missing piece of the code is simply to append the text from item to Textbox1.

In VB6 this could be as simple as
Expand|Select|Wrap|Line Numbers
  1. Textbox2 = Textbox2 & item.<whatever> & VbNewLine
In VB.Net I have no idea how to concatenate a string. Also, the "<whatever>" is there because I'm not familiar with the object model so don't know what property contains the text.
Feb 19 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: CHANGE username to westes | last post by:
What are the most popular, and well supported, libraries of drivers for bar code scanners that include a Visual Basic and C/C++ API? My requirements are: - Must allow an application to be...
1
by: rdshultz | last post by:
I am the beginner of all beginners in Visual Basic.Net 2003. I'm looking for two types of books. One specifically directed towards beginners and one that shows examples of code for different...
5
by: rogerc | last post by:
My name is Roger. I am very, very new to programming. I hope someone can help me with a problem in VB. I need to copy a text file into an array, the file can very in size, but the strings are...
1
by: vivekgrs | last post by:
hi in the text file iam having the data as mention below.i want 2 retrieve thru vb. 2 34 56 98 245 i want 2 retrive the data individually which is...
2
by: chaosdl | last post by:
Hello, I am currently using Visual Basic 2005 express edition with a MS Access database. I have made a "Contacts" Form, where the user will be able to enter a members surname and press an OK...
4
by: Ntamushobora | last post by:
I would to get codes which copy a content in text box into another one using visual basic 6.0
8
by: levi | last post by:
Hallo I have some problems regarding text filtering with Visual Basic. In order to filter only some text lines I want to make a copy of the file as a temporary one, read this copy as a file...
3
by: DGee | last post by:
Hi, this is my first post, so be nice on me! I currently have a program that will input and save into a text file. It stores information on the operations of the program, such as inputs, errors...
0
by: bdhassan87 | last post by:
how can i insert data to datagrid from text box using visual basic 6.0
13
by: brat33 | last post by:
I am in the process of modifying some code that reads a .txt file after it has been created from .pdf (this works great) and find a specific line in the text file. Once I have found this line (it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.