Click here to Skip to main content
16,004,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: Associating values to a combo box Pin
Kallol Roy2-Dec-05 19:40
Kallol Roy2-Dec-05 19:40 
QuestionQuestion about TextBox control Pin
Stanciu Vlad2-Dec-05 10:12
Stanciu Vlad2-Dec-05 10:12 
AnswerRe: Question about TextBox control Pin
Jared Parsons2-Dec-05 11:36
Jared Parsons2-Dec-05 11:36 
GeneralRe: Question about TextBox control Pin
Stanciu Vlad3-Dec-05 2:28
Stanciu Vlad3-Dec-05 2:28 
AnswerRe: Question about TextBox control Pin
Rob Philpott2-Dec-05 11:53
Rob Philpott2-Dec-05 11:53 
GeneralRe: Question about TextBox control Pin
Stanciu Vlad3-Dec-05 2:25
Stanciu Vlad3-Dec-05 2:25 
GeneralRe: Question about TextBox control Pin
Rob Philpott3-Dec-05 3:29
Rob Philpott3-Dec-05 3:29 
QuestionThreading problem Pin
mav.northwind2-Dec-05 9:50
mav.northwind2-Dec-05 9:50 
Hi all!

I got a Windows Forms application where an event is fired from a secondary thread. When this event is fired, I call
this.BeginInvoke(new MethodInvoker(someMenuItem.PerformClick)); 
to simulate a menu item click.
This works fine, but when the event handler for someMenuItem pops up a modal dialog, this dialog appears more than once if the event re-fires before the first dialog is closed. Frown | :(
So I tried encapsulating someMenuItem's event handler code inside a lock(this) {} and now only a single modal dialog is shown at most.
So far, so good.
But if the event re-fires now, all these events are suspended as long as the lock() statement is active and executed in row afterwards.
Is there a way to change the behaviour so that the events are discarded instead of being stored?

Thanks in advance for any ideas,
mav
AnswerRe: Threading problem Pin
Jared Parsons2-Dec-05 11:37
Jared Parsons2-Dec-05 11:37 
GeneralRe: Threading problem Pin
mav.northwind2-Dec-05 12:03
mav.northwind2-Dec-05 12:03 
GeneralRe: Threading problem Pin
S. Senthil Kumar2-Dec-05 21:13
S. Senthil Kumar2-Dec-05 21:13 
GeneralRe: Threading problem Pin
mav.northwind2-Dec-05 21:52
mav.northwind2-Dec-05 21:52 
QuestionCrystal Report ParameterFields Pin
Bedevian2-Dec-05 9:28
Bedevian2-Dec-05 9:28 
QuestionMDI child forms states Pin
Ammar Ben Hadj Amor2-Dec-05 8:14
professionalAmmar Ben Hadj Amor2-Dec-05 8:14 
AnswerRe: MDI child forms states Pin
Dave Kreskowiak2-Dec-05 10:47
mveDave Kreskowiak2-Dec-05 10:47 
QuestionFile.Copy Error - Please Help Pin
Joshua Lunsford2-Dec-05 8:02
Joshua Lunsford2-Dec-05 8:02 
AnswerRe: File.Copy Error - Please Help Pin
Joshua Lunsford2-Dec-05 9:19
Joshua Lunsford2-Dec-05 9:19 
AnswerRe: File.Copy Error - Please Help Pin
mav.northwind2-Dec-05 10:12
mav.northwind2-Dec-05 10:12 
GeneralRe: File.Copy Error - Please Help Pin
Joshua Lunsford2-Dec-05 10:15
Joshua Lunsford2-Dec-05 10:15 
GeneralRe: File.Copy Error - Please Help Pin
Joshua Lunsford2-Dec-05 10:51
Joshua Lunsford2-Dec-05 10:51 
GeneralRe: File.Copy Error - Please Help Pin
Dave Kreskowiak2-Dec-05 14:16
mveDave Kreskowiak2-Dec-05 14:16 
AnswerRe: File.Copy Error - Please Help Pin
RobertoTjMx7-Dec-05 12:32
RobertoTjMx7-Dec-05 12:32 
QuestionHow to keep a datatable? Pin
Julianne_juju2-Dec-05 7:40
Julianne_juju2-Dec-05 7:40 
AnswerRe: How to keep a datatable? Pin
enjoycrack2-Dec-05 7:51
enjoycrack2-Dec-05 7:51 
AnswerRe: How to keep a datatable? Pin
Rob Graham2-Dec-05 10:09
Rob Graham2-Dec-05 10:09 

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.