Welcome to Dream.In.Code
Become a C# Expert!

Join 150,395 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,042 people online right now. Registration is fast and FREE... Join Now!




Readind A File Asynchronously

 
Reply to this topicStart new topic

Readind A File Asynchronously, Cross-thread operation not valid: Control 'txtResult' accessed

Azo
9 Mar, 2008 - 10:46 PM
Post #1

New D.I.C Head
*

Joined: 9 Mar, 2008
Posts: 2

[font=Arial][size=7]
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Readind A File Asynchronously
9 Mar, 2008 - 11:01 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks smile.gif
User is online!Profile CardPM
+Quote Post

jabir
RE: Readind A File Asynchronously
12 Mar, 2008 - 03:55 AM
Post #3

New D.I.C Head
*

Joined: 12 Mar, 2008
Posts: 1

QUOTE(Azo @ 9 Mar, 2008 - 11:46 PM) *

[font=Arial][size=7]

use delegate for accessing function
for Example for Setting text in aTextbox Write like this


//----
private delegate void SetText(TextBox txt, String text);
private void settex(TextBox txt, String text)
{
if (txt.InvokeRequired)
{
txt.Invoke(new SetText(settex), new object[] { txt, text });
}
else
{
txt.Text = text;
}
}
//-------------
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 06:12PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month