Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prgAll.Maximum = lbFolders.SelectedItems.Count;
- foreach (string dir in lbFolders.SelectedItems)
- lblStatus.Invoke((Action)(() => lblStatus.Text = counter.ToString()));
- lblTest.Invoke((MethodInvoker)(delegate()
- {
- lblTest.Text = i.ToString();
- }));
- prgAll.Maximum = lbFolders.SelectedItems.Count;
- void SetMax()
- {
- if (prgAll.InvokeRequired)
- {
- prgAll.BeginInvoke(new MethodInvoker(SetMax));
- return;
- }
- prgAll.Maximum = lbFolders.SelectedItems.Count;
- }
- private void RunMe()
- {
- if (!InvokeRequired)
- {
- myLabel.Text = "You pushed the button!";
- }
- else
- {
- Invoke(new ThreadStart(RunMe));
- }
- }
Add Comment
Please, Sign In to add comment