Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know Pcapdot.net, but I know Winforms so I can give you a couple of hints.</p> <p>It appears that your UI is <em>stuck</em> in the sense that the window is unresponsive (you cannot click active buttons or edit textboxes, and if you try the window becomes gray). In that case you do have a threading problem. I don't know if that <code>BackgroundWorker</code> is a library class or one that you made, but you <strong>must</strong> be sure that any I/O operation is done in another thread. While the name suggests that it happens, I'm not sure about how you start the process against what is supposed by the API. For example, certain libraries allow you to call a <code>start</code> method that forks another thread, while others require you to call an <code>execute</code> method from a thread you already forked. This makes the difference.</p> <p>In order to update your UI from a non-UI thread you must always use <code>[Control.Invoke][1]</code> method (if you need to pause your thread until UI gets updated) or <code>Control.BeginInvoke</code> (if you want to proceed ASAP).</p> <p>My <code>Lambda-fu</code> is not trained daily, so please correct me if I make an error in my syntax</p> <pre><code>progressBar1.Invoke(delegate() {progressBar1.Value = e.ProgressPercentage;}); </code></pre> <p><strike>In the second case in which your UI is <em>stuck</em> in the sense that the progress bar won't progress, first make sure that the event is fired. Second and most important, you <strong>cannot</strong> update UI from a non-UI thread. Imperative!</p> <p>If you run that <code>progressChanged</code> method inside a try-catch I see troubles, because when you update the progressBar percentage you get an exception that could be masked. I also hope that <code>ProcessPercentage</code> is an integer between 0 and 100 and not a <code>double</code> between 0 and 1, something that causes the bar not to apparently progress.</strike></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload