getting error - System.InvalidOperationException was unhandled
问题 I have just started to learn windows application development, and we have been given self learn project to develop one windows application. I am trying to create the application to send email. I have created a class MsgSender.cs to handle that. When I call that class from main form I am getting the following error System.InvalidOperationException was unhandled. Error Message--> Cross-thread operation not valid: Control 'pictureBox1' accessed from a thread other than the thread it was created