Click here to Skip to main content
15,896,308 members
Home / Discussions / C#
   

C#

 
GeneralRe: Window Address Pin
curtuy11-Oct-09 6:03
curtuy11-Oct-09 6:03 
QuestionRe: Window Address Pin
harold aptroot11-Oct-09 5:55
harold aptroot11-Oct-09 5:55 
JokeRe: Window Address Pin
Eddy Vluggen11-Oct-09 6:03
professionalEddy Vluggen11-Oct-09 6:03 
GeneralRe: Window Address Pin
curtuy11-Oct-09 6:05
curtuy11-Oct-09 6:05 
AnswerRe: Window Address Pin
dan!sh 11-Oct-09 7:31
professional dan!sh 11-Oct-09 7:31 
GeneralRe: Window Address Pin
curtuy12-Oct-09 1:14
curtuy12-Oct-09 1:14 
QuestionThreadpool help [modified] Pin
OptiPlex11-Oct-09 5:45
OptiPlex11-Oct-09 5:45 
AnswerRe: Threadpool help Pin
Luc Pattyn11-Oct-09 5:53
sitebuilderLuc Pattyn11-Oct-09 5:53 
Hi,

there could be two issues:

1.

OptiPlex wrote:
CheckForIllegalCrossThreadCalls = false;


IMO is a very bad idea. If you feel a need to disable those checks, something is fundamentally wrong. Please read this article[^].

2.

AFAIK a lot of (all?) COM components (and that includes the Clipboard) require to be handled only by threads that are in a "Single Threaded Apartment", which also is a way to obtain thread safety. You can get things right by either specifying [STAThread] in front of your public static Main() method (which is there by default IIRC), or by setting it explicitly on the relevant thread, using Thread.GetCurrentThread().SetThreadAppartmentState().

[EDIT]
As one can set the AppState only once for a thread, this may not work for ThreadPool threads; so you may have to create your own Thread(s) instead.
[/EDIT]

Smile | :)

Luc Pattyn

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages

Local announcement (Antwerp region): Lange Wapper? Neen!


GeneralRe: Threadpool help Pin
OptiPlex11-Oct-09 7:04
OptiPlex11-Oct-09 7:04 
GeneralRe: Threadpool help Pin
Luc Pattyn11-Oct-09 7:50
sitebuilderLuc Pattyn11-Oct-09 7:50 
QuestionCall a method using Windows forms Pin
Tamara Clifton11-Oct-09 5:43
Tamara Clifton11-Oct-09 5:43 
AnswerRe: Call a method using Windows forms Pin
dan!sh 11-Oct-09 5:57
professional dan!sh 11-Oct-09 5:57 
QuestionMonitor keys while the control is NOT in focus Pin
p3rson11-Oct-09 4:44
p3rson11-Oct-09 4:44 
AnswerRe: Monitor keys while the control is NOT in focus Pin
stancrm11-Oct-09 4:48
stancrm11-Oct-09 4:48 
AnswerRe: Monitor keys while the control is NOT in focus Pin
Anthony Mushrow11-Oct-09 7:06
professionalAnthony Mushrow11-Oct-09 7:06 
QuestionReturning datatable/dataset by from server in a Multithread Client server socket programming Pin
AhmedMasum11-Oct-09 2:55
AhmedMasum11-Oct-09 2:55 
AnswerRe: Returning datatable/dataset by from server in a Multithread Client server socket programming Pin
Eddy Vluggen11-Oct-09 3:51
professionalEddy Vluggen11-Oct-09 3:51 
GeneralRe: Returning datatable/dataset by from server in a Multithread Client server socket programming Pin
AhmedMasum12-Oct-09 4:25
AhmedMasum12-Oct-09 4:25 
GeneralRe: Returning datatable/dataset by from server in a Multithread Client server socket programming Pin
Eddy Vluggen12-Oct-09 5:25
professionalEddy Vluggen12-Oct-09 5:25 
QuestionTracing different threads Pin
manustone11-Oct-09 2:11
manustone11-Oct-09 2:11 
AnswerRe: Tracing different threads Pin
Keith Barrow11-Oct-09 2:30
professionalKeith Barrow11-Oct-09 2:30 
Questionopen exe file Pin
Member 432709611-Oct-09 1:28
Member 432709611-Oct-09 1:28 
AnswerRe: open exe file Pin
dataminers11-Oct-09 1:53
dataminers11-Oct-09 1:53 
AnswerRe: open exe file Pin
Md. Marufuzzaman11-Oct-09 2:12
professionalMd. Marufuzzaman11-Oct-09 2:12 
AnswerRe: open exe file Pin
Abhijit Jana11-Oct-09 3:50
professionalAbhijit Jana11-Oct-09 3:50 

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.