sanyogtripathi
Starting Member
India
1 Posts |
Posted - 22 June 2009 : 15:37:35
|
I want to write incoming and out going messages to the UI Form. But when i am calling BeginInvoke method. it is showing exception message "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." and Invoke required method is not being set to true, which should be set when calling method from another thread. I am using following code. if (InvokeRequired) { object[] pList = { message };
Txt_RecievedFrmCOM.BeginInvoke(new WriteLineDelegate(WriteFix2), pList); } else { WriteFix2(message); } So can any one help me and let me know that how can i Update it to the textbox on UI Form. Thanks In Advance.......... Please reply........
<moved from="DEV Discussions (General)" /> |
Jr Software Er. L-Tech India Software systems pvt ltd. Lucknow +919935720073 |
Edited by - AnonJr on 22 June 2009 15:48:04 |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 22 June 2009 : 21:02:41
|
quote: Originally posted by sanyogtripathi
I want to write incoming and out going messages to the UI Form. But when i am calling BeginInvoke method. it is showing exception message "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." and Invoke required method is not being set to true, which should be set when calling method from another thread. I am using following code. if (InvokeRequired) { object[] pList = { message };
Txt_ReceivedFrmCOM.BeginInvoke(new WriteLineDelegate(WriteFix2), pList); } else { WriteFix2(message); } So can any one help me and let me know that how can i Update it to the textbox on UI Form. Thanks In Advance.......... Please reply........
<moved from="DEV Discussions (General)" />
Not familiar with the method, but you misspelled "received" and that may affect it. |
|
|