Page 2 of 2 FirstFirst 12
Results 41 to 43 of 43

Thread: ping using vb.error ??

  1. #41

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    98

    Re: ping using vb.error ??

    ha mickey was giving out to me for starin a new one now your giving out to me for not startin a new-one ! ders no keeping ye thread-heads happy. yeah im fairly new to vb so i just want to try and keep the solution as simple as possible. and i dont mind if the program appears to pause for a few seconds in fact i dont mind if it pauses for a few mins , its more than likely only going to be run once a day so that wont really be an issue as long as it does run !

    so how would these Application.DoEvents() at the start of the array solve this problem ?

  2. #42
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: ping using vb.error ??

    Yes it solves...

    BTW, you have a progress bar that does nothing...

    Put this before the for cycle:
    VB.NET Code:
    1. ProgressBar1.Minimum = 0
    2. ProgressBar1.Maximum = ds.Tables("monitor").Rows.Count - 1

    And inside put this
    VB.NET Code:
    1. ProgressBar1.Value = i

    Rate People That Helped You
    Mark Thread Resolved When Resolved

  3. #43
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: ping using vb.error ??

    so how would these Application.DoEvents() at the start of the array solve this problem ?
    At the start of the loop you mean. An Array is a collection of objects, you are looping through the array with your "For i = 0 To..." etc etc code.

    Application.DoEvents() basically just pauses your code execution for a brief moment to let the application process messages that have been sent to it (this is the message pump that your error message mentioned). These messages are sent to a program all the time by windows and are what tells it when you have clicked something or when it needs to update the screen etc, which is why without processing this "message pump" then your program appears to freeze.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width