The 'solution' that was given first worked for me. Again my problem was only there when I was debugging in Visual Studio. Running the code in the normal way didn't pose any problems. So it seems to be only a VS issue!! I will read the article that you described and see if something in the code has to be changed. Although I doubt that since I make use of delegates and that should take care of the thread issues. Thanks for the feedback. Regards, Jan
jkpieters
Posts
-
Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on. -
Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on.I have a tcp server that cooperates with a windows forms aplication. Now I have the following problem: When I run it outside Visual Studio everything works just fine. But when I want to debug the application inside Visual Studio I get the message: "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." What can be the reason for this? Any suggestions?
-
How to pad a string with zeroesThanks for the answer, however I did fed it a number also like this String.Format(CultureInfo.InvariantCulture, "{0:00000.0000}", 455.66); But the point is that the data to be formatted is in a string[] and even when I convert the string first to a double or whatever the result is the same, even the conversion is giving funky results: 45566 instead of 455.66!! I am not sure but I must be doing something stupid probably.
-
How to pad a string with zeroesHi, I have the following string "455.56" I want this to format in: 00455.5600. I tried this and was expecting it to work fine: string strLong = String.Format(CultureInfo.InvariantCulture, "{0:00000.0000}", "455.66"); This statement results in: "455.66"!! Why doesn't this work as expected? Other solutions? thanks for your time. Regards, Jan