Click here to Skip to main content
15,903,385 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I check if the datasource is writable? Pin
Robert Rohde28-Jun-06 20:01
Robert Rohde28-Jun-06 20:01 
GeneralRe: How can I check if the datasource is writable? Pin
Dave Kreskowiak29-Jun-06 1:31
mveDave Kreskowiak29-Jun-06 1:31 
QuestionModal Dialog help in C# [modified] Pin
McSmack28-Jun-06 14:57
McSmack28-Jun-06 14:57 
AnswerRe: Modal Dialog help in C# Pin
Alexander Wiseman28-Jun-06 15:41
Alexander Wiseman28-Jun-06 15:41 
QuestionRe: Modal Dialog help in C# [modified] Pin
Martin#28-Jun-06 19:34
Martin#28-Jun-06 19:34 
AnswerRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 5:39
Alexander Wiseman29-Jun-06 5:39 
GeneralRe: Modal Dialog help in C# [modified] Pin
Martin#29-Jun-06 6:11
Martin#29-Jun-06 6:11 
GeneralRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 6:30
Alexander Wiseman29-Jun-06 6:30 
Martin,

If you want to pass arguments to the method that you invoke, you cannot use MethodInvoker. The other constructor of MethodInvoker won't help you. The function which you specify with the delegate has to have the same signature as the delegate, and because the MethodInvoker delegate has a void parameter list, the method you invoke with it must also have a void parameter list.

I'm not exactly clear about what your XXXChanged function is supposed to be doing. However, if you want to invoke the YYYChanged function from it and change back to the main thread, then you can do exactly the same thing you did in the YYYChanged function, like this:
private void XXXChanged(object sender, XXEventArgs e)
{
     if(InvokeRequired)
     {
          BeginInvoke(new ActionDelegate(YYYChanged), new object [] { e } );
          return;
     }
     ...
}
If you do not need to change threads and you want to call the function YYYChanged directly from XXXChanged then I see no reason to use the Invoke function.

Let me know if that helps you out. If not, could you be a little more specific with what you want the XXXChanged function to do?

Sincerely,
Alexander Wiseman
GeneralRe: Modal Dialog help in C# Pin
Martin#29-Jun-06 6:41
Martin#29-Jun-06 6:41 
GeneralRe: Modal Dialog help in C# Pin
McSmack29-Jun-06 6:00
McSmack29-Jun-06 6:00 
QuestionRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 6:41
Alexander Wiseman29-Jun-06 6:41 
AnswerRe: Modal Dialog help in C# Pin
McSmack29-Jun-06 7:17
McSmack29-Jun-06 7:17 
QuestionRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 10:53
Alexander Wiseman29-Jun-06 10:53 
AnswerRe: Modal Dialog help in C# Pin
McSmack29-Jun-06 12:19
McSmack29-Jun-06 12:19 
GeneralRe: Modal Dialog help in C# Pin
Alexander Wiseman29-Jun-06 12:54
Alexander Wiseman29-Jun-06 12:54 
QuestionQuick button question [modified] Pin
Arkon94828-Jun-06 13:05
Arkon94828-Jun-06 13:05 
AnswerRe: Quick button question [modified] Pin
Mike Poz28-Jun-06 13:45
Mike Poz28-Jun-06 13:45 
QuestionExporting to SPSS issue Pin
Nader Elshehabi28-Jun-06 11:59
Nader Elshehabi28-Jun-06 11:59 
AnswerRe: Exporting to SPSS issue Pin
farquem828-Jun-06 16:01
farquem828-Jun-06 16:01 
GeneralRe: Exporting to SPSS issue Pin
Nader Elshehabi28-Jun-06 17:29
Nader Elshehabi28-Jun-06 17:29 
QuestionASP.net and Javascript Pin
Naji.A28-Jun-06 11:27
Naji.A28-Jun-06 11:27 
AnswerRe: ASP.net and Javascript Pin
Guffa28-Jun-06 12:06
Guffa28-Jun-06 12:06 
GeneralAny helpful hints? Pin
Naji.A28-Jun-06 12:12
Naji.A28-Jun-06 12:12 
AnswerRe: Any helpful hints? Pin
Guffa28-Jun-06 19:31
Guffa28-Jun-06 19:31 
GeneralError Messages? [modified] Pin
Naji.A29-Jun-06 22:01
Naji.A29-Jun-06 22:01 

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.