Results 1 to 3 of 3

Thread: Timers with For Each

  1. #1
    Syzis is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2011
    Posts
    10
    Reputation
    28

    Timers with For Each

    Hello,

    I'm learning how to use proxies at VB .Net and with that I want to develop a small application for learning purposes only.

    I have a listbox with proxies and each proxy will navigate a webbrowser to a website that will tell what's the current IP. ( just to check if their working )

    I'm using a for each to run all the proxies but the problem is the application don't let the time to proxy connect.
    I could use a thread sleep but I don't want the application to be unanswering.

    My problem is how to input a timer with a for each. Basically, in each proxy it will wait about 20 seconds for example and then go to next proxy in the list.

    Any help?

  2. #2
    Lotok is offline VB.NET Forum Genius
    .NET Framework
    .NET 4.0
    Join Date
    Jan 2012
    Location
    Scotland
    Posts
    193
    Reputation
    22
    When you say you do not want your application to go 'Not Responding', is there something else going on that a sleep cannot be used or are you just wanting to stay away from that message panicing users?

    You could probably use a background worker, within that worker you could use sleep and the main thread would remain active.
    I cant say I've put a sleep in the bg worker before, but I cant see why that wouldnt do the trick

  3. #3
    Herman is offline VB.NET Forum Miyagee
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2011
    Location
    Montreal, QC, CA
    Posts
    448
    Reputation
    346
    If this exercise is a problem, threading and dealing with delegates is probably way over his head.

    Hmm re-reading it seems your problem is with the way you are handling the actual connection, please post some code if you need help.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Harvest time tracking