Chris McKelt

Remembering Thoughts

 

Recent comments

Archive

Authors

Categories

None


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012

Winforms UI cross thread operations

ThreadPool.QueueUserWorkItem(new WaitCallback(LoadUsers));
 
private void LoadUsers(Object stateInfo)
 
    var site = new SPSite(testHarnessSettings.Url);
     var web = site.OpenWeb();
      foreach(SPUser user in web.AllUsers)
      {
       if (usersListBox.InvokeRequired)
       {
             usersListBox.Invoke(new MethodInvoker(delegate { usersListBox.Items.Add((user.LoginName)); }));
       }                                
 
 

 

http://weblogs.asp.net/justin_rogers/articles/126345.aspx 

Posted by chris on Friday, February 27, 2009 4:27 AM
Permalink | Comments (1) | Post RSSRSS comment feed

Comments (1) -

outsourcing it United States

Tuesday, October 26, 2010 12:29 PM

outsourcing it

thanks for the ideas , i’d love to stick to your weblog as generally as i can.have a great day