Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
AnswerRe: Dynamically ENUM Pin
zlezj12-May-09 23:02
zlezj12-May-09 23:02 
AnswerRe: Dynamically ENUM Pin
Guffa13-May-09 0:48
Guffa13-May-09 0:48 
AnswerRe: Dynamically ENUM Pin
Paulo Zemek13-May-09 9:00
Paulo Zemek13-May-09 9:00 
QuestionStandalone application.... Pin
Rajdeep.NET is BACK12-May-09 19:03
Rajdeep.NET is BACK12-May-09 19:03 
AnswerRe: Standalone application.... Pin
N a v a n e e t h12-May-09 19:22
N a v a n e e t h12-May-09 19:22 
GeneralRe: Standalone application.... Pin
Rajdeep.NET is BACK12-May-09 20:06
Rajdeep.NET is BACK12-May-09 20:06 
GeneralRe: Standalone application.... Pin
V.12-May-09 20:14
professionalV.12-May-09 20:14 
GeneralRe: Standalone application.... Pin
N a v a n e e t h12-May-09 20:27
N a v a n e e t h12-May-09 20:27 
GeneralRe: Standalone application.... Pin
OriginalGriff12-May-09 21:55
mveOriginalGriff12-May-09 21:55 
GeneralRe: Standalone application.... Pin
Guffa13-May-09 0:59
Guffa13-May-09 0:59 
AnswerRe: Standalone application.... Pin
Wes Aday13-May-09 10:32
professionalWes Aday13-May-09 10:32 
AnswerRe: Standalone application.... Pin
PIEBALDconsult13-May-09 14:36
mvePIEBALDconsult13-May-09 14:36 
QuestionRemove processes from memory on abnormal exit Pin
aastudent12-May-09 18:57
aastudent12-May-09 18:57 
AnswerRe: Remove processes from memory on abnormal exit Pin
N a v a n e e t h12-May-09 19:48
N a v a n e e t h12-May-09 19:48 
QuestionAny methods or modules for C# that speed up the thumbnail generation Pin
pinyojit12-May-09 18:55
pinyojit12-May-09 18:55 
QuestionDiference betwteen DrawText and RichTextEdit (winforms) [modified] Pin
ramaluciano12-May-09 18:50
ramaluciano12-May-09 18:50 
AnswerRe: Diference betwteen DrawText and RichTextEdit (winforms) Pin
Henry Minute13-May-09 0:56
Henry Minute13-May-09 0:56 
QuestionDetermine device type using IP Pin
lachu00912-May-09 18:19
lachu00912-May-09 18:19 
AnswerRe: Determine device type using IP Pin
Rajdeep.NET is BACK12-May-09 18:52
Rajdeep.NET is BACK12-May-09 18:52 
AnswerRe: Determine device type using IP Pin
Fatbuddha 112-May-09 22:12
Fatbuddha 112-May-09 22:12 
AnswerRe: Determine device type using IP Pin
OriginalGriff12-May-09 23:03
mveOriginalGriff12-May-09 23:03 
QuestionTryEnter always return true in Timer Event Pin
geossl12-May-09 17:40
geossl12-May-09 17:40 
AnswerRe: TryEnter always return true in Timer Event Pin
N a v a n e e t h12-May-09 18:23
N a v a n e e t h12-May-09 18:23 
AnswerRe: TryEnter always return true in Timer Event Pin
OriginalGriff12-May-09 22:42
mveOriginalGriff12-May-09 22:42 
AnswerRe: TryEnter always return true in Timer Event Pin
Nicholas Butler12-May-09 23:18
sitebuilderNicholas Butler12-May-09 23:18 
TryEnter always succeeds because you are always calling it on the same ( UI ) thread and Monitor is reentrant.

Your MessageBox doesn't totally block the UI thread. It runs a partial message loop and one of the messages it processes is the Windows.Forms.Timer message. Therefore, when the next tick happens, your handler is run again from inside the MessageBox message loop. TryEnter succeeds because the UI thread already owns the lock and Monitor allows a thread to lock an object multiple times.

Nick

----------------------------------
Be excellent to each other Smile | :)

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.