Nasss's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
5 (0.01 per day)
Joined:
06-October 12
Profile Views:
118
Last Active:
User is offline Oct 06 2012 08:24 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   Nasss has not set their status

Posts I've Made

  1. In Topic: Listbox Line Going One By One In Textbox.

    Posted 6 Oct 2012

    View PostdotINSolution, on 06 October 2012 - 08:09 AM, said:

    To switch to a new item after every seconds, use this code:
      For i As Integer = 0 To ListBox1.Items.Count - 1 Step 1
                                                 ListBox1.SelectedIndex = i
                                                 Thread.Sleep(5000) ' Wait for 5 seconds
                                             Next
    

    You can offcourse run that code inside a different thread. Or modify it to a infinite loop that sets index back to 0 when the current index is the last item



    THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!

    +REP
  2. In Topic: Listbox Line Going One By One In Textbox.

    Posted 6 Oct 2012

    View PostCharlieMay, on 06 October 2012 - 07:14 AM, said:

    View PostNasss, on 06 October 2012 - 09:46 AM, said:

    Oh , I left that part out.

    So can you supply it?


    Look what I'm saying is: Let's say you have the following in your listbox
      123.456.789.012
      123.456.789.013
      321.654.987.111


    Now lets suppose you clicked on the first item of the listbox
    You can set the textbox1.text = listbox1.selecteditem
    now textbox1.text holds the SAME thing that is selected in listbox1 (because you filled in with a list of strings)

    Now lets say you want to use that value

    Messagebox.Show("My Textbox Shows:" & TextBox1.Text)
    would result in a messagebox that reads: My Textbox Shows: 123.456.789.012

    But, let's decide that we didn't use the textbox but instead used the selecteditem of the listbox
    Messagebox.Show("I selected in my list: " & ListBox1.SelectedItem
    would result in a messagebox that reads: I selected in my list: 123.456.789.012

    As you can see both results are the same because all you did in the textbox was copy a string of a selected item to a string in a textbox to use as a string in something else.

    All I'm pointing out is you're just using two different ways of displaying a string to get a string when you could have just taken it straight from the source. (in this case the ListBox)


    That all made perfect sense , but I wan't the listbox to switch to a new item after like every x.x.x seconds.
  3. In Topic: Listbox Line Going One By One In Textbox.

    Posted 6 Oct 2012

    View PostCharlieMay, on 06 October 2012 - 06:36 AM, said:

    OK, so where is the code where you're putting the selecteditem of the listbox into the textbox as you described above?

    Also, why do you need it to go to a textbox? are you going to use the contents of that textbox in something? If you need the textbox to be what is hilighted in the listbox, why not just use the selecteditem of the listbox to get that value to use in something.


    Oh , I left that part out. And yes I will be using the textbox for something , I need each IP to be switched with a timer in the textbox through the value of the listbox. I just need the listbox to be able to update my IPs.
  4. In Topic: Listbox Line Going One By One In Textbox.

    Posted 6 Oct 2012

    View PostCharlieMay, on 06 October 2012 - 06:11 AM, said:

    Can we see the line where you're putting the item from the listbox into the textbox. It sounds like you're performing a concatenation. If you set the text property = something that is what the text property holds. If you are concatenating the text property, it will add to what is there.

    Let's see where you're setting the text property of the textbox.


    Ok , well this is all in one button.

    '*Grabbing our proxy text from our online server (this way we can keep updating our proxies).
            Dim Str As System.IO.Stream
            Dim srRead As System.IO.StreamReader
            Try
                ' make a Web request
                Dim req As System.Net.WebRequest = System.Net.WebRequest.Create("https://dl.dropbox.com/u/100659925/ProxiesPortAlways8080.txt")
                Dim resp As System.Net.WebResponse = req.GetResponse
                Str = resp.GetResponseStream
                srRead = New System.IO.StreamReader(Str)
                ' read all the text 
                TextBox2.Text = srRead.ReadToEnd
            Catch ex As Exception
                TextBox2.Text = "Unable to download content"
            Finally
                '  Close Stream and StreamReader when done
                srRead.Close()
                Str.Close()
            End Try
    
            ' Assign string to reference.
            Dim value1 As String = TextBox2.Text
    
    
            ' Replace word with another word.
            Dim value2 As String = value1.Replace("<br>", vbNewLine)
            TextBox2.Text = value2
            ListBox1.Items.Add(TextBox2.Text)
    
            '*Now , we're taking our fresh proxies in the textbox and moving them into our listbox.
    
            ListBox1.Items.AddRange(TextBox2.Text.Split(vbNewLine))
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Nasss hasn't added any friends yet.

Comments

Nasss has no profile comments yet. Why not say hello?