Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
AnswerRe: TextBox border Pin
Nader Elshehabi28-Aug-06 5:19
Nader Elshehabi28-Aug-06 5:19 
GeneralRe: TextBox border Pin
mav.northwind28-Aug-06 8:26
mav.northwind28-Aug-06 8:26 
Questionhow to add checkbox column in datagrid Pin
iramg26-Aug-06 7:35
iramg26-Aug-06 7:35 
AnswerRe: how to add checkbox column in datagrid Pin
Ed.Poore26-Aug-06 8:58
Ed.Poore26-Aug-06 8:58 
GeneralRe: how to add checkbox column in datagrid Pin
iramg26-Aug-06 9:16
iramg26-Aug-06 9:16 
GeneralRe: how to add checkbox column in datagrid Pin
Ed.Poore26-Aug-06 9:37
Ed.Poore26-Aug-06 9:37 
QuestionHTTPS Proxy Pin
WillemM26-Aug-06 7:09
WillemM26-Aug-06 7:09 
QuestionInvoking an event... Pin
Shy Agam26-Aug-06 6:56
Shy Agam26-Aug-06 6:56 
I have a class library I wrote, which deals with sockets.
I raise events through this library, such as DataArrival (which gives me the problem btw).

This is a snippet from my receiveCallback function:
//Retrieve the buffer.
Buffer bf = (Buffer)result.AsyncState;
//Seperate packs and enqueue them.
bf.QueuePacks();
if (OnDataArrival != null)
{
    //Call EventHandler to process incomming data.
    if (caller != null) caller.Invoke(OnDataArrival, bf);
    else OnDataArrival(bf);
}
//Begin receiving data from the remote computer.
sck.BeginReceive(bf.Data, 0, bf.Data.Length, SocketFlags.None, new AsyncCallback(receiveCallBack), bf);
Buffer is also a class I wrote, and caller is a reference to a form.
This code works most of the time.
I'm currently working on a new project which uses my class.
In this project, I sometimes get an "Parameter is invalid" exception, on this line:
caller.Invoke(OnDataArrival, bf);
It works most of the time, and never happend in my previous projects.

Is it wrong to invoke an event?
What's wrong with my parameters?
AnswerRe: Invoking an event... Pin
Ed.Poore26-Aug-06 9:37
Ed.Poore26-Aug-06 9:37 
GeneralRe: Invoking an event... Pin
Shy Agam26-Aug-06 12:34
Shy Agam26-Aug-06 12:34 
GeneralRe: Invoking an event... Pin
Ed.Poore27-Aug-06 8:21
Ed.Poore27-Aug-06 8:21 
AnswerRe: Invoking an event... Pin
Nader Elshehabi26-Aug-06 21:57
Nader Elshehabi26-Aug-06 21:57 
QuestionHow to check a DataGridViewCheckBoxCell? Pin
printscreen1234526-Aug-06 5:55
printscreen1234526-Aug-06 5:55 
AnswerRe: How to check a DataGridViewCheckBoxCell? Pin
Nader Elshehabi26-Aug-06 22:05
Nader Elshehabi26-Aug-06 22:05 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
printscreen1234527-Aug-06 3:59
printscreen1234527-Aug-06 3:59 
AnswerRe: How to check a DataGridViewCheckBoxCell? Pin
Nader Elshehabi27-Aug-06 5:13
Nader Elshehabi27-Aug-06 5:13 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
printscreen1234527-Aug-06 6:12
printscreen1234527-Aug-06 6:12 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
Nader Elshehabi27-Aug-06 7:55
Nader Elshehabi27-Aug-06 7:55 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
printscreen1234527-Aug-06 22:10
printscreen1234527-Aug-06 22:10 
QuestionHow do I edit comboboxes on web pages? Using MSHTML Pin
spark12800026-Aug-06 3:24
spark12800026-Aug-06 3:24 
Questiona program for documentation. Pin
Green Fuze26-Aug-06 2:03
Green Fuze26-Aug-06 2:03 
AnswerRe: a program for documentation. Pin
Nader Elshehabi26-Aug-06 2:09
Nader Elshehabi26-Aug-06 2:09 
GeneralRe: a program for documentation. Pin
Colin Angus Mackay26-Aug-06 2:17
Colin Angus Mackay26-Aug-06 2:17 
GeneralRe: a program for documentation. Pin
Green Fuze26-Aug-06 2:18
Green Fuze26-Aug-06 2:18 
AnswerRe: a program for documentation. Pin
Colin Angus Mackay26-Aug-06 2:16
Colin Angus Mackay26-Aug-06 2:16 

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.