Hi,
We have a usercontrol with a number of controls on it. One being a radio
button and one being a button.
When we set button.enabled = false the click event of the radio button is
being raised.
The click event for all buttons & radio buttons is handled by a single
routine.
Private Sub Control_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Me.IsDirty = True
End Sub
Here's the non-user code that is being executed:
system.windows.forms.dll!System.Windows.Forms.Control.OnClick(System.EventAr
gs e = {System.EventArgs}) + 0x5e bytes
system.windows.forms.dll!System.Windows.Forms.RadioButton.OnClick(System.Eve
ntArgs e = {System.EventArgs}) + 0x25 bytes
system.windows.forms.dll!System.Windows.Forms.RadioButton.OnEnter(System.Eve
ntArgs e = {System.EventArgs}) + 0x36 bytes
system.windows.forms.dll!System.Windows.Forms.Control.NotifyEnter() + 0x15
bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.UpdateFocused
Control() + 0x1d9 bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.AssignActiveC
ontrolInternal(System.Windows.Forms.Control value = {Text="Yes"
Checked=true}) + 0x26 bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.ActivateContr
olInternal(System.Windows.Forms.Control control = {Text="Yes" Checked=true},
bool originator = false) + 0xf0 bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.SetActiveCont
rolInternal(System.Windows.Forms.Control value = {Text="Yes" Checked=true})
+ 0xf2 bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.SetActiveCont
rol(System.Windows.Forms.Control ctl = {Text="Yes" Checked=true}) + 0x30
bytes
system.windows.forms.dll!System.Windows.Forms.ContainerControl.set_ActiveCon
trol(System.Windows.Forms.Control value = {Text="Yes" Checked=true}) + 0x10
bytes
system.windows.forms.dll!System.Windows.Forms.Control.Select(bool directed
= true, bool forward = true) + 0x30 bytes
system.windows.forms.dll!System.Windows.Forms.Control.SelectNextControl(Syst
em.Windows.Forms.Control ctl = {Text="Yes" Checked=true}, bool forward =
true, bool tabStopOnly = true, bool nested = true, bool wrap = true) + 0xb7
bytes
system.windows.forms.dll!System.Windows.Forms.Control.SelectNextIfFocused()
+ 0xaa bytes
system.windows.forms.dll!System.Windows.Forms.Control.set_Enabled(bool
value = false) + 0x4b bytes
This really is strange behaviour. Has anyone else encountered anything like
this?
TIA
"Peter Huang" - 26 Oct 2004 06:40 GMT
Hi,
I can not reproduce the problem, can you provide a simple reproduce sample
so that we can troubleshooting the problem.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
G Namx - 27 Oct 2004 10:49 GMT
Found it was because I was firing button.enabled=false on a worker thread
instead of the thread where the button was created. Ouch!
> Hi,
>
[quoted text clipped - 8 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" - 28 Oct 2004 06:32 GMT
Hi
I am glad that the problem is resolved.
Cheers!
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.