drawString and Thread problem
-
hi, i am using DrawString method to display text in my Smartphone application when form is painted. i have added a method to the Paint event handler for this: this.Paint += new PaintEventHandler(DrawMainPage); when i get new data i have to repaint the form to inorder to show new data. but when i call myform.invalidate() from different form then i gives me error that i have to invoke this method from the same thread. i tried do upate my code accordingly (http://www.codeproject.com/csharp/begininvoke.asp) but i get the same error. will appreciate help. regards, rnv
-
hi, i am using DrawString method to display text in my Smartphone application when form is painted. i have added a method to the Paint event handler for this: this.Paint += new PaintEventHandler(DrawMainPage); when i get new data i have to repaint the form to inorder to show new data. but when i call myform.invalidate() from different form then i gives me error that i have to invoke this method from the same thread. i tried do upate my code accordingly (http://www.codeproject.com/csharp/begininvoke.asp) but i get the same error. will appreciate help. regards, rnv