[Mono-bugs] [Bug 341314] System.ArgumentException: Cannot activate invisible or disabled control
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Nov 14 09:02:37 EST 2007
https://bugzilla.novell.com/show_bug.cgi?id=341314#c3
Ian Walker <walker_643 at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
Info Provider|walker_643 at yahoo.com |
--- Comment #3 from Ian Walker <walker_643 at yahoo.com> 2007-11-14 07:02:37 MST ---
Test on 1.2.6 preview package failed; same dump as before:
Unhandled Exception: System.ArgumentException: Cannot activate invisible or
disabled control.
at System.Windows.Forms.ContainerControl.set_ActiveControl
(System.Windows.Forms.Control value) [0x00221] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs:178
at System.Windows.Forms.Control.Select (System.Windows.Forms.Control control)
[0x00021] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:1317
at System.Windows.Forms.Form.SelectActiveControl () [0x00054] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:259
at System.Windows.Forms.Form.WmActivate (System.Windows.Forms.Message& m)
[0x0001d] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2586
at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m)
[0x00100] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:2408
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:225
at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:206
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x0006a] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:188
at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message,
IntPtr wParam, IntPtr lParam) [0x0008d] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:4883
at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id,
System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32
wFilterMax) [0x01193] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:4051
at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id,
System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax)
[0x00000] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:671
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00392] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:854
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00014] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:630
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/usr/local/src/mono-1.2.6-preview/mono-1.2.6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:618
at MyCo.MyProject.Program.Main () [0x00026] in
/source/myco/myproject/Program.cs:23
Incidentally, I have a workaround for this problem. It seems to be triggered
when the child form is dismissed and focus returns to the main form. The
control that was last active on the main form just happens to have had its
Visible property set to false (hence the "active" control is invisible) and MWF
complains instead of picking another control. My workaround was to add
this.someButton.Focus(); // where 'this' == main form
before the child form is dismissed.
Unfortunately, I have not been able to reproduce this in a small test case or I
would post one. Maybe it's not as simple as returning to a form where the last
active control is now hidden? I'm still working on it :)
--
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