user2699298
user2699298

Reputation: 1476

Label move the position on its own

This is maybe stupid, but I seriously don't know why it does this:

enter image description here

As you can see in the gif, the first proxy is normally placed, but all other proxies went to new line.

I am importing proxies like this:

Dim ofd As New OpenFileDialog With {.Filter = "Text Files (.txt)|*.txt"}
If ofd.ShowDialog = vbOK Then
    Dim sr As IO.StreamReader = New IO.StreamReader(ofd.FileName)
    proxies = sr.ReadToEnd
    list = proxies.Split(Environment.NewLine)
End If

In timer I have this:

Label6.Text = list(ProxyIndex)
UseProxy(list(ProxyIndex))
'here is where I am navigating to the website'
ProxyIndex += 1 

Upvotes: 0

Views: 93

Answers (1)

ElektroStudios
ElektroStudios

Reputation: 20464

Try this (Fixed):

Label6.Text = list(ProxyIndex).Trim

If that does not works, then try this else:

Label6.Text = list(ProxyIndex.replace(Environment.NewLine, string.empty))

Upvotes: 1

Related Questions