473,378 Members | 1,592 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,378 software developers and data experts.

Remove unwanted characters from a ListBox

Zam
11
Hi everybody!

I want to remove the first three characters or letters
in a ListBox, Does any one know how can i do this?

Thanks
Sep 6 '06 #1
8 3269
phpmaet
27
Hi,
This code remove the first 3 character from a listbox.

Expand|Select|Wrap|Line Numbers
  1.  list1.text=mid(list1.text,1,3) 
Thanks
Sep 7 '06 #2
Zam
11
The code is not working : (

Here it is you code in action, but nothing happen.



I been trying to remove the "ABC" character on the Form_Load
I try you code in three diferent ways, but no matter what, it doesn't work.

I appreciate you help

Thanks
Sep 7 '06 #3
Zam
11
Can some one else help me to solve this problem?

Thanks
Sep 8 '06 #4
for(int i = 0; i < listBox1.Items.Count; i++)
{
listBox1.Items[i] = listBox1.Items[i].ToString().Substring(3);
}
Sep 9 '06 #5
Zam
11
Hello there


This is not a visual basic code



Thanks
Sep 9 '06 #6
Hemant Pathak
92 Expert
Hi Zam

try this code to remove first 3 charector of list box

private sub RemoveChar_Click()
'This Code is working in this type or charector abcExample
list1.list(list.listindex)=mid(list1.list(list.lis tindex),4)
'This Code is working in this type or charector abc Example
list1.list(list.listindex)=mid(list1.list(list.lis tindex),5)
end sub


if this code is not working then u please send me ur code...
i will try........
pathak.pathak@gmail.com
Sep 9 '06 #7
Zam
11
Are you kidding?

This is not a VB code

I think you r just playing arround with my question.
Sep 9 '06 #8
Zam
11
In this forum or community I think they all are like me...
No one have any idea of what we are doing in here, Why?
Well, just read yeah read and read, and you'll see how many
users are asking for question that nobody seen to care or they
just don't know what the other user is asking about, then you'll
undestand the why i post this message here.
Sep 9 '06 #9

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

Similar topics

3
by: Nicki Carstensen | last post by:
hi I have a string from which I would like to purge all whitespaces, non-english letters and special characters. I know I can use String.TrimStart(char) and then provide a list of all unwanted...
4
by: Ron | last post by:
I've got a listbox that holds a list of groups. Users can select a group, hit the remove button and the group should be removed from the listbox. The only problem is that no matter which group you...
1
by: Chris Kettenbach | last post by:
Good Morning, I have a text box on a webform I use to display a phone number. The database field does not contain parentheses or hyphens. I want the use to be able to change the textbox text and...
3
by: Danny Yeadon | last post by:
Hi I need to remove unwanted characters from phone numbers from my phone bill to analyse the data. Some examples are 02 48222222 i need to remove the space +61266667656 ...
8
by: Paul | last post by:
Hi, My VB is very rusty I'm afraid! What would be the most efficient way to remove the following ASCII characters from a string? à è ì ò ù À È Ì Ò Ù á é í ó ú ý Á É Í Ó Ú Ý â ê î ô û Â Ê Î Ô...
4
by: vvenk | last post by:
Hello: I have a string, "Testing_!@#$%^&*()". It may have single and double quotations as well. I would like to strip all chararcters others than a-z, A-Z, 0-9 and the comma. I came across...
5
by: joe | last post by:
hello i have a databse program that uses char arrays to output data to reports. I would like to remove all invalid characters from the array and replace them with a blank space. I have problems...
2
by: Harry Haller | last post by:
Can I remove text from a StringWriter ? I have a StringWriter object, the content of which looks like this: "<div>Some other html which I wish to keep</div>" Can I remove the unwanted <div>,...
1
by: JB | last post by:
Hi All, I'm writing XML in VB.NET 2005 using the System.Xml.XmlWriter class. It's all working fine but I'd like to remove a few NewLine characters. For instance if I use the following code:...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.