Code: Select all
Ranorex.Core.Reporting.TestReport.Setup(ReportLevel.None, "tempTestReport.rxlog", false);
Ranorex.Core.Reporting.TestReport.EnableTracingScreenshots = false;
Ranorex.Core.Reporting.TestReport.ReportWriteInterval = 0;
Ranorex.Controls.ProgressForm.Show();
At the end of the process I am hiding the ProgressForm but getting an exception.
Code: Select all
Ranorex.Controls.ProgressForm.Hide();
Code: Select all
Fatal error: System.InvalidOperationException: Cross-thread operation not valid: Control 'ProgressForm' accessed from a thread other than the thread it was created on.
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Hide()
at Ranorex.Controls.ProgressForm.Hide()
at CBS_Import_Test.Program.VerifyTags(Form HDClientForm, String[] Tags) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\CBS Import Test\CBS Import Test\Program.cs:line 1127
at CBS_Import_Test.Program.CBSImportTest(String strDateTimeStamp, String strDateTimeStampClean) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\CBS Import Test\CBS Import Test\Program.cs:line 302
at CBS_Import_Test.Program.Main(String[] args) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\CBS Import Test\CBS Import Test\Program.cs:line 101