Hi all,
I have an application that opens a form using frmWebQ.Show() and there it asks the user a question. Instead of replying immediately the user can choose to be reminded later (after a selectable time periods betwen 10 min and 30 days). When remind later is chosen the form activates a timer for the requested time period and minimizes itself to the task tray (Me.WindowState = FormWindowState .Minimized). Meanwhile the user can continue his work in the main form. After the time has elapsed the event handler (Timer.Elapsed( )) is activated and here the form should be restored to its original size again using Me.WindowState = FormWindowState .Normal.
However, this generates the following exception (translated from German by Google): "Illegal cross-thread operation: access to the control frmWebQ was from a thread other than the thread in which it was created."
Any hint, how to overcome that? Thanks in advance.
I have an application that opens a form using frmWebQ.Show() and there it asks the user a question. Instead of replying immediately the user can choose to be reminded later (after a selectable time periods betwen 10 min and 30 days). When remind later is chosen the form activates a timer for the requested time period and minimizes itself to the task tray (Me.WindowState = FormWindowState .Minimized). Meanwhile the user can continue his work in the main form. After the time has elapsed the event handler (Timer.Elapsed( )) is activated and here the form should be restored to its original size again using Me.WindowState = FormWindowState .Normal.
However, this generates the following exception (translated from German by Google): "Illegal cross-thread operation: access to the control frmWebQ was from a thread other than the thread in which it was created."
Any hint, how to overcome that? Thanks in advance.
Comment