Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 23rd, 2003, 10:14 AM
Blu3_sniper Blu3_sniper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 1 Blu3_sniper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Blu3_sniper Send a message via Yahoo to Blu3_sniper
looping problem

Ok, well first off i'm very new to VB, new to all lang. Anyways the probelm i'm having is looping something. This is what i am trying to do. I'm making a list compactor, prolly never heard of it, mainly cause it doesn't exist yet. What it is, is you load a .txt file into a listbox. And you press a cmd. button with the following code.

Private Sub Command5_Click()
Dim lisst2 As Integer
lisst2 = 2
List2.AddItem List2.Text
If lisst2 = 2 Then
Text1.Text = List2.ListCount
End If
End Sub

All that will do, is transfer one string to the other listbox right ?. What i wanna do is loop that, so when i press the button, it will go through ALL the strings, in the 1st listbox, thus transfering everyhting from list1 to list2. If you asking, why such a program. Is because i use proxies, ALOT of proxies. And in a .txt file, you can only paste so many strings, and then it will give u an error saying something bout memory. but with this i found you can do it without that prob. If anyone knows what ima talkin bout, or could even help me, i'd be most appreciated, and credit will be given, where it's do. Thanx for your time.

- sniper -

Reply With Quote
  #2  
Old July 23rd, 2003, 01:15 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Not sure if I understand all of what your problems are here, but here is a sample little application to demonstrate how to transfere data between two listboxes in different methods.
Attached Files
File Type: zip test.zip (2.0 KB, 306 views)

Reply With Quote
  #3  
Old July 23rd, 2003, 03:04 PM
mescaline mescaline is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 mescaline User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to mescaline
I kinda get what ur doin.. but any way.. if u wanna loop something here is how to do it:

first put 'Do' where you want the code to start looping.. then put the code..
then put:
loop until somehing = something..

get it? no? heres and example

Private Sub Command1_Click()

Do
Text1 = Text1 + 1
Loop Until Text1 = Text2

End Sub

so on this example when u press the cmd.. the text1 (which had a number value) will increase in ones untill it reaches the value of text box 2... then it will just stop! this happens in a split second!..

if you dont get any of this.. just use a timer and put it on 1.. and inside the timer put your code..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > looping problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway