Asked By Gonzalo
10-Nov-09 10:20 PM
Hi all,
I have a chat application in Windows CE 6.0 with 2 TextBox, one TextBox to
write the frame to send an the other one to write the frames sent and
received.
When I send a frame, I write it in the TextBox.
private void ButtonSend_Click(object sender, EventArgs e)
{
if (TextBoxSend.Text != "")
MyXBeeDevice.Transmit(TextBoxSend.Text);
TextBoxLog.Text += "-> " + TextBoxSend.Text + "\r\n";
TextBoxSend.Text = "";
TextBoxSend.Focus();
}
However, when I receive a frame, I cannot write it in the TextBox, I have an
Exception.
private void PacketReceived(XBeeDevice sender, byte[] ReceivedData)
{
TextBoxLog.Text += "<- " +
InternalEncoding.GetString(ReceivedData, 0, (int)ReceivedData.Length) +
}
I have tried write a string in the TextBox e.g.("Hello World") and I have
the same Exception. Does anyone know what is the problem?
Thank you .