[Mono-bugs] [Bug 341314] System.ArgumentException: Cannot activate invisible or disabled control

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 13 10:47:23 EST 2007


--- Comment #1 from Ian Walker <walker_643 at yahoo.com>  2007-11-13 08:47:22 MST ---
More info... the TCP/IP data is being read via a timer_tick() procedure.
'timer' is a SWF.Timer object on the main form (FormMain). Inside the tick
thread, there is the following code:

FormMessage formMessage = this.Invoke(new
Response<FormMessage>(ShowMessageForm)) as FormMessage;

/* do work. We hang onto formMessage but we DO NOT use it in this thread */

this.Invoke(new Action<FormMessage>(HideMessageForm), formMessage);

'this' is a FormMain object, 'Response' is   'public delegate T Response<T>();'

The two invoked procedures look like this:

private FormMessage ShowMessageForm()
  // This procedure is invoked from timer_tick(). We are in the main/GUI thread
  FormMessage form = new FormMessage();
  form.MessageText = "Please standby...";
  return (form);
private void HideMessageForm(FormMessage form)
  // This procedure is invoked from timer_tick(). We are in the main/GUI thread

Commenting out the  form.Show();  line prevents the exception from happening. I
would like to emphasize that no GUI work is being done from the tick thread.
Hope this helps :)

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list