Click here to Skip to main content
16,017,986 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan28-Nov-06 17:16
Anish Gangadharan28-Nov-06 17:16 
AnswerRe: Problem with response.binarywrite() Pin
Guffa28-Nov-06 20:28
Guffa28-Nov-06 20:28 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan28-Nov-06 22:24
Anish Gangadharan28-Nov-06 22:24 
AnswerRe: Problem with response.binarywrite() Pin
Guffa28-Nov-06 22:33
Guffa28-Nov-06 22:33 
GeneralRe: Problem with response.binarywrite() Pin
Anish Gangadharan28-Nov-06 23:20
Anish Gangadharan28-Nov-06 23:20 
AnswerRe: Problem with response.binarywrite() Pin
Guffa29-Nov-06 1:24
Guffa29-Nov-06 1:24 
QuestionHow do i fire a event from the AsycnCallBack right ? [modified] Pin
MarkPhB27-Nov-06 0:02
MarkPhB27-Nov-06 0:02 
AnswerRe: How do i fire a event from the AsycnCallBack right ? Pin
Stefan Troschuetz27-Nov-06 1:34
Stefan Troschuetz27-Nov-06 1:34 
The problem is that you fire the event on a thread other than the main UI thread and it's not allowed to access UI controls from threads other the one they were created on as this can trigger unexpected behaviour e.g. freezing your app. You have to handle this on your event handler in the following way:
private void receiveDataEvent(byte[] data)
{
    if (this.InvokeRequired)
    {
        this.Invoke(new ReceiveDataEventHandler(this.receiveDataEvent), data);
    }
    else
    {
        //...
    }
}

For some more information on invoking take a look at the following article: What's up with BeginInvoke?[^]
Last but not least: Please always put pre tags around multiline code snippets as this preserves indentation and therefor makes the snippet much more readable.


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

www.troschuetz.de

GeneralRe: How do i fire a event from the AsycnCallBack right ? Pin
MarkPhB27-Nov-06 5:19
MarkPhB27-Nov-06 5:19 
GeneralRe: How do i fire a event from the AsycnCallBack right ? Pin
Stefan Troschuetz27-Nov-06 6:21
Stefan Troschuetz27-Nov-06 6:21 
QuestionDatagridview Pin
Skajus26-Nov-06 23:58
Skajus26-Nov-06 23:58 
QuestionCrystalReport 11.5 with VisualStudio.net 2005 Pin
bahaa_sa526-Nov-06 23:50
bahaa_sa526-Nov-06 23:50 
AnswerRe: CrystalReport 11.5 with VisualStudio.net 2005 Pin
eng_mohamed_hammad27-Nov-06 3:27
eng_mohamed_hammad27-Nov-06 3:27 
QuestionSend Html file to printer Pin
Support12326-Nov-06 23:48
Support12326-Nov-06 23:48 
Questionhow to show Records in a DataGrid ?? Pin
Ahsanzm26-Nov-06 23:20
Ahsanzm26-Nov-06 23:20 
AnswerRe: how to show Records in a DataGrid ?? Pin
Bassam Saoud27-Nov-06 2:24
Bassam Saoud27-Nov-06 2:24 
QuestionDatGridView ... Pin
IamHuM26-Nov-06 23:10
IamHuM26-Nov-06 23:10 
AnswerRe: DatGridView ... Pin
Drew McGhie27-Nov-06 5:16
Drew McGhie27-Nov-06 5:16 
GeneralRe: DatGridView ... Pin
IamHuM27-Nov-06 15:57
IamHuM27-Nov-06 15:57 
GeneralRe: DatGridView ... Pin
Drew McGhie29-Nov-06 10:21
Drew McGhie29-Nov-06 10:21 
QuestionMessage box Pin
Shriya Kapoor26-Nov-06 22:59
Shriya Kapoor26-Nov-06 22:59 
AnswerRe: Message box Pin
sTTorM26-Nov-06 23:20
sTTorM26-Nov-06 23:20 
GeneralRe: Message box Pin
Bhupi Bhai26-Nov-06 23:26
Bhupi Bhai26-Nov-06 23:26 
GeneralRe: Message box Pin
Shriya Kapoor26-Nov-06 23:47
Shriya Kapoor26-Nov-06 23:47 
GeneralRe: Message box Pin
Bhupi Bhai26-Nov-06 23:53
Bhupi Bhai26-Nov-06 23:53 

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.