Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: URGENT PLZ: how to print an invoice or receipt? Pin
Jassim Rahma5-Mar-07 9:15
Jassim Rahma5-Mar-07 9:15 
GeneralRe: URGENT PLZ: how to print an invoice or receipt? Pin
Pete O'Hanlon5-Mar-07 22:16
mvePete O'Hanlon5-Mar-07 22:16 
QuestionProblem painting. Please help!!! Pin
Iker Llanos4-Mar-07 20:38
Iker Llanos4-Mar-07 20:38 
QuestionHow to Create New File In C#.net Pin
jaganil4-Mar-07 20:33
jaganil4-Mar-07 20:33 
AnswerRe: How to Create New File In C#.net Pin
VirtualVoid.NET4-Mar-07 21:22
VirtualVoid.NET4-Mar-07 21:22 
QuestionData in the grid is not refreshing with out break points Pin
Najeed4-Mar-07 20:11
Najeed4-Mar-07 20:11 
QuestionThe report has no tables. Pin
waleed994-Mar-07 19:56
waleed994-Mar-07 19:56 
Questionhow to send a delegate to a fuction with a parameter? Pin
Hussam Fattahi4-Mar-07 19:43
Hussam Fattahi4-Mar-07 19:43 
I don't know if the above question is correct, my english it's not very good.

however, i'm trying to make a safe thread call to a form :
I have declared a chatForms array with name (chatsAvailabel), so when i want to show
one of them i call the fuction ShowForm with a parameter that specify the index of the
form in the array.

delegate void ShowFormCallback(int index);


private void ShowForm(int index)
        {
            if (this.chatsAvailabe[index].InvokeRequired)
            {
                ShowFormCallback tmp = new ShowFormCallback(ShowForm(index));  //error here
                this.chatsAvailabe[index].Invoke(tmp);
            }
            else
                this.chatsAvailabe[index].Show();
        }



but the problem occures when the InvokeRequired is true in if bolck, i must declare an
instance from the ShowFormCallback delegate to use with invoke, but how could i send
parmaeter index again along with this delegate instance.

thanks in advance
AnswerRe: how to send a delegate to a fuction with a parameter? Pin
VirtualVoid.NET4-Mar-07 21:26
VirtualVoid.NET4-Mar-07 21:26 
GeneralRe: how to send a delegate to a fuction with a parameter? Pin
Hussam Fattahi4-Mar-07 22:52
Hussam Fattahi4-Mar-07 22:52 
GeneralRe: how to send a delegate to a fuction with a parameter? Pin
VirtualVoid.NET4-Mar-07 23:51
VirtualVoid.NET4-Mar-07 23:51 
AnswerRe: how to send a delegate to a fuction with a parameter? Pin
Ennis Ray Lynch, Jr.5-Mar-07 4:15
Ennis Ray Lynch, Jr.5-Mar-07 4:15 
QuestionHow to close the window using its Window Handle. Pin
engsrini4-Mar-07 19:41
engsrini4-Mar-07 19:41 
AnswerRe: How to close the window using its Window Handle. Pin
stancrm4-Mar-07 22:06
stancrm4-Mar-07 22:06 
GeneralRe: How to close the window using its Window Handle. Pin
engsrini4-Mar-07 22:32
engsrini4-Mar-07 22:32 
Questionhow to update changes in SQL database using DataAdapter Pin
niting854-Mar-07 19:22
niting854-Mar-07 19:22 
AnswerRe: how to update changes in SQL database using DataAdapter Pin
Colin Angus Mackay4-Mar-07 20:45
Colin Angus Mackay4-Mar-07 20:45 
AnswerRe: how to update changes in SQL database using DataAdapter Pin
Luka Grabarevic5-Mar-07 0:06
Luka Grabarevic5-Mar-07 0:06 
Questionadd virtual column Pin
waleed994-Mar-07 18:24
waleed994-Mar-07 18:24 
AnswerRe: add virtual column Pin
saeee4-Mar-07 19:59
saeee4-Mar-07 19:59 
QuestionAn elevator Problem Pin
ebey4-Mar-07 18:18
ebey4-Mar-07 18:18 
AnswerRe: An elevator Problem Pin
benjymous5-Mar-07 1:37
benjymous5-Mar-07 1:37 
QuestionEnabling checkbox functioanlity in datagrid Pin
salon4-Mar-07 17:48
salon4-Mar-07 17:48 
QuestionAssigning a TextBox object to another TextBox object Pin
GunaChinna4-Mar-07 17:32
GunaChinna4-Mar-07 17:32 
AnswerRe: Assigning a TextBox object to another TextBox object Pin
S. Senthil Kumar4-Mar-07 18:46
S. Senthil Kumar4-Mar-07 18:46 

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.