Click here to Skip to main content
16,005,281 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regex.Replace Chr(10) Pin
Guffa31-Aug-06 8:00
Guffa31-Aug-06 8:00 
GeneralRe: Regex.Replace Chr(10) Pin
John Petersen31-Aug-06 22:43
John Petersen31-Aug-06 22:43 
GeneralRe: Regex.Replace Chr(10) Pin
J Liang2-Sep-06 3:12
J Liang2-Sep-06 3:12 
QuestionLocking within a single thread Pin
Dan Neely31-Aug-06 3:55
Dan Neely31-Aug-06 3:55 
AnswerRe: Locking within a single thread Pin
Not Active31-Aug-06 5:06
mentorNot Active31-Aug-06 5:06 
AnswerRe: Locking within a single thread Pin
Nader Elshehabi31-Aug-06 5:14
Nader Elshehabi31-Aug-06 5:14 
GeneralRe: Locking within a single thread Pin
Dan Neely31-Aug-06 5:54
Dan Neely31-Aug-06 5:54 
AnswerRe: Locking within a single thread Pin
mav.northwind31-Aug-06 7:37
mav.northwind31-Aug-06 7:37 
Hi!
I think you have a misconception of lock() here...
lock(obj) is used to prevent two or more different threads from entering the same critical section.

Both listviews are handled by the same thread - the UI thread and the listviews are just regular win32 common controls underneath which are sending their windows messages to the thread's message queue.
It's because of these queued messages that your listviews receive their SelectedIndexChanged events...

Removing and re-adding the eventhandlers, as the others have suggested, seems a bit clumsy to me.
As you wrote, a boolean pseudo-lock seems to be the easier solution.


Regards,
mav

--
Black holes are the places where god divided by 0...

QuestionUsing COM? Pin
Dominik Reichl31-Aug-06 3:20
Dominik Reichl31-Aug-06 3:20 
AnswerRe: Using COM? Pin
Bhupi Bhai1-Sep-06 2:55
Bhupi Bhai1-Sep-06 2:55 
Questionsetup file Pin
TAREQ F ABUZUHRI31-Aug-06 2:36
TAREQ F ABUZUHRI31-Aug-06 2:36 
AnswerRe: setup file Pin
Nader Elshehabi31-Aug-06 4:52
Nader Elshehabi31-Aug-06 4:52 
Questionhow to create a new .net solution at the run time or from other solution Pin
Brosis31-Aug-06 2:23
Brosis31-Aug-06 2:23 
AnswerRe: how to create a new .net solution at the run time or from other solution Pin
Nader Elshehabi31-Aug-06 4:56
Nader Elshehabi31-Aug-06 4:56 
GeneralRe: how to create a new .net solution at the run time or from other solution Pin
Brosis31-Aug-06 18:34
Brosis31-Aug-06 18:34 
AnswerRe: how to create a new .net solution at the run time or from other solution Pin
Nader Elshehabi1-Sep-06 5:16
Nader Elshehabi1-Sep-06 5:16 
Questionhow to use MD5 technics Pin
narendrakumarp31-Aug-06 2:23
narendrakumarp31-Aug-06 2:23 
AnswerRe: how to use MD5 technics Pin
SharpenedC31-Aug-06 2:27
SharpenedC31-Aug-06 2:27 
AnswerRe: how to use MD5 technics Pin
Rob Philpott31-Aug-06 5:01
Rob Philpott31-Aug-06 5:01 
QuestionMemory Leak? Pin
SharpenedC31-Aug-06 2:03
SharpenedC31-Aug-06 2:03 
AnswerRe: Memory Leak? Pin
Martin#31-Aug-06 2:09
Martin#31-Aug-06 2:09 
GeneralRe: Memory Leak? Pin
SharpenedC31-Aug-06 2:20
SharpenedC31-Aug-06 2:20 
GeneralRe: Memory Leak? Pin
J4amieC31-Aug-06 2:36
J4amieC31-Aug-06 2:36 
GeneralRe: Memory Leak? Pin
SharpenedC31-Aug-06 2:44
SharpenedC31-Aug-06 2:44 
GeneralRe: Memory Leak? Pin
J4amieC31-Aug-06 4:21
J4amieC31-Aug-06 4:21 

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.