Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 How to Move Items from ListBox to ListView & Trim Last 4/5 Chars?

$
0
0
I am creating a Tool to Show Country flags from IPs and using same method for my Proxy Tool. All the IP's + Ports are added in a Listbox.
I use an ImageList in LISTVIEW for the flags. The listbox is very important for me to use. But to add IP'S from LISTBOX to LISTVIEW I dont need the PORTS, starting from this => : character. And I need to add 10 Items at least at once from LISTBOX to LISTVIEW.

Here is an example how the IP's Looks Like:
Code:

155.55.33.22.1:12345
155.55.33.22.1:8080
155.55.33.22.1:80
155.55.33.22.1:808

The ports can be from 2 to 5 characters, and plus the collon : upto 6 characters that I have to ignore or remove from the end of my text
I tried a lot using the "StartsWith" technique and I event tried using regex adding the code as "[0-9]:" but still I failed... Now after a few hours I am exhausted and need some help fixing this..

If I could get a short guide about how to ADD the IPs as Multiple and trim from the collon :, I would be appereciated.

Kindly Regards, M

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>