Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
GeneralRe: Delay windows power events Pin
Member 1085025320-Jun-15 1:34
Member 1085025320-Jun-15 1:34 
QuestionInheritance Pin
JammoD8719-Jun-15 11:35
JammoD8719-Jun-15 11:35 
AnswerRe: Inheritance Pin
harold aptroot19-Jun-15 11:44
harold aptroot19-Jun-15 11:44 
GeneralRe: Inheritance Pin
JammoD8719-Jun-15 11:46
JammoD8719-Jun-15 11:46 
GeneralRe: Inheritance Pin
harold aptroot19-Jun-15 11:51
harold aptroot19-Jun-15 11:51 
SuggestionRe: Inheritance Pin
Sascha Lefèvre19-Jun-15 12:53
professionalSascha Lefèvre19-Jun-15 12:53 
AnswerRe: Inheritance Pin
JammoD8719-Jun-15 21:26
JammoD8719-Jun-15 21:26 
QuestionC# need 2 threads for long execution Pin
dracebus19-Jun-15 8:48
dracebus19-Jun-15 8:48 
Hi there, this is my first post, sorry if I dont get it right on the first time.
I have a program that loads data from a sharepoint.
It loads txt files, xml files, etc.
Any of these "load" actions take a lot of time because of the user's connectivity to the sharepoint.
Therefore the whole windows form UI gets unresponsive until the data is loaded.

So I would like to learn how can I easily create a thread for that "retrieval" of information while the whole windows forms UI still works and is operative.


Thanks in advance.

This is an example of one of the longest tasks, and I would like to encapsulate it into a new thread if possible
C#
XmlDataDocument xmlDoc = new XmlDataDocument();
string str = "http://www.w3schools.com/xml/note.xml"

            WebRequest request = WebRequest.Create(str);
            request.Timeout = 30 * 60 * 1000;
            request.UseDefaultCredentials = true;
            request.Proxy.Credentials = request.Credentials;
            WebResponse response = (WebResponse)request.GetResponse();
            using (Stream fs = response.GetResponseStream())
            
            xmlDoc.Load(fs);

AnswerRe: C# need 2 threads for long execution Pin
PIEBALDconsult19-Jun-15 8:59
mvePIEBALDconsult19-Jun-15 8:59 
GeneralRe: C# need 2 threads for long execution Pin
dracebus19-Jun-15 9:02
dracebus19-Jun-15 9:02 
GeneralRe: C# need 2 threads for long execution Pin
PIEBALDconsult19-Jun-15 9:12
mvePIEBALDconsult19-Jun-15 9:12 
GeneralRe: C# need 2 threads for long execution Pin
Dave Kreskowiak19-Jun-15 9:21
mveDave Kreskowiak19-Jun-15 9:21 
GeneralRe: C# need 2 threads for long execution Pin
Philippe Mori19-Jun-15 16:20
Philippe Mori19-Jun-15 16:20 
QuestionTrying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 16:17
Norris Chappell18-Jun-15 16:17 
AnswerRe: Trying to sum several fields into a total field Pin
OriginalGriff18-Jun-15 19:15
mveOriginalGriff18-Jun-15 19:15 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 20:26
Norris Chappell18-Jun-15 20:26 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 20:31
Norris Chappell18-Jun-15 20:31 
GeneralRe: Trying to sum several fields into a total field Pin
Pete O'Hanlon18-Jun-15 22:39
mvePete O'Hanlon18-Jun-15 22:39 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 4:44
Norris Chappell19-Jun-15 4:44 
GeneralRe: Trying to sum several fields into a total field Pin
Richard MacCutchan19-Jun-15 7:02
mveRichard MacCutchan19-Jun-15 7:02 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 7:23
Norris Chappell19-Jun-15 7:23 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 5:35
Norris Chappell19-Jun-15 5:35 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell19-Jun-15 9:30
Norris Chappell19-Jun-15 9:30 
AnswerRe: Trying to sum several fields into a total field Pin
Agent__00718-Jun-15 20:30
professionalAgent__00718-Jun-15 20:30 
GeneralRe: Trying to sum several fields into a total field Pin
Norris Chappell18-Jun-15 20:36
Norris Chappell18-Jun-15 20:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.