Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: double Pin
Dan Neely4-Sep-08 4:32
Dan Neely4-Sep-08 4:32 
QuestionPanel screencapture is black in invisible part of panel Pin
joost.versteegen4-Sep-08 2:05
joost.versteegen4-Sep-08 2:05 
AnswerRe: Panel screencapture is black in invisible part of panel Pin
leppie4-Sep-08 9:02
leppie4-Sep-08 9:02 
GeneralRe: Panel screencapture is black in invisible part of panel Pin
joost.versteegen4-Sep-08 23:11
joost.versteegen4-Sep-08 23:11 
GeneralRe: Panel screencapture is black in invisible part of panel Pin
leppie4-Sep-08 23:47
leppie4-Sep-08 23:47 
GeneralRe: Panel screencapture is black in invisible part of panel Pin
joost.versteegen9-Sep-08 20:27
joost.versteegen9-Sep-08 20:27 
QuestionPlease help with Serial Communication [modified] Pin
introuble24-Sep-08 2:00
introuble24-Sep-08 2:00 
AnswerRe: Please help with Serial Communication Pin
Gideon Engelberth4-Sep-08 3:05
Gideon Engelberth4-Sep-08 3:05 
The error you are getting is related to the way that the serial port works. The DataReceived event is not raised on the main thread. In general, this is a good thing since it allows you to perform all the processing on the incoming serial data without blocking the UI thread. However as with all things multi-threaded, that means that you can no longer interact with controls directly from the event handler (or any other routines the handler calls). You will need to use this.BeginInvoke to get back to the main thread.

public void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
string strResult = sp.ReadExisting();
ekraan.Text += strResult; //THE ERROR POINTS HERE
}


becomes:

public void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
this.BeginInvoke(new Action<string>(UpdateData), sp.ReadExisting());
}

private void UpdateData(string message)
{
ekraan.Text += message;
}</string>

GeneralRe: Please help with Serial Communication Pin
introuble24-Sep-08 3:32
introuble24-Sep-08 3:32 
GeneralRe: Please help with Serial Communication Pin
Mbah Dhaim4-Sep-08 10:12
Mbah Dhaim4-Sep-08 10:12 
GeneralRe: Please help with Serial Communication Pin
Gideon Engelberth4-Sep-08 12:32
Gideon Engelberth4-Sep-08 12:32 
GeneralRe: Please help with Serial Communication Pin
introuble24-Sep-08 22:23
introuble24-Sep-08 22:23 
GeneralRe: Please help with Serial Communication [modified] Pin
introuble217-Sep-08 22:22
introuble217-Sep-08 22:22 
GeneralRe: Please help with Serial Communication Pin
introuble217-Sep-08 22:37
introuble217-Sep-08 22:37 
QuestionSecuring DLL Pin
Member 40066484-Sep-08 1:10
Member 40066484-Sep-08 1:10 
AnswerCross Post. Please ignore. Pin
Pete O'Hanlon4-Sep-08 1:51
mvePete O'Hanlon4-Sep-08 1:51 
Questionread a specified element in the xml file Pin
prasadbuddhika4-Sep-08 0:57
prasadbuddhika4-Sep-08 0:57 
AnswerRe: read a specified element in the xml file Pin
Ashfield4-Sep-08 1:54
Ashfield4-Sep-08 1:54 
GeneralRe: read a specified element in the xml file Pin
Pete O'Hanlon4-Sep-08 2:09
mvePete O'Hanlon4-Sep-08 2:09 
QuestionHow to display image in datagrid Pin
V K Gupta4-Sep-08 0:45
V K Gupta4-Sep-08 0:45 
AnswerRe: How to display image in datagrid Pin
Mbah Dhaim4-Sep-08 3:29
Mbah Dhaim4-Sep-08 3:29 
AnswerRe: How to display image in datagrid Pin
nelsonpaixao4-Sep-08 13:10
nelsonpaixao4-Sep-08 13:10 
Questionlistview ?? Pin
Hum Dum4-Sep-08 0:45
Hum Dum4-Sep-08 0:45 
QuestionTransleuscent Dialog Pin
Mridang Agarwalla4-Sep-08 0:44
Mridang Agarwalla4-Sep-08 0:44 
AnswerRe: Transleuscent Dialog Pin
Anthony Mushrow4-Sep-08 4:07
professionalAnthony Mushrow4-Sep-08 4:07 

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.