Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Unexpected event raised on radio button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
G Namx - 25 Oct 2004 12:34 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.