473,326 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Unexpected event raised on radio button

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.Cont rol.OnClick(System.EventAr
gs e = {System.EventArgs}) + 0x5e bytes

system.windows.forms.dll!System.Windows.Forms.Radi oButton.OnClick(System.Eve
ntArgs e = {System.EventArgs}) + 0x25 bytes

system.windows.forms.dll!System.Windows.Forms.Radi oButton.OnEnter(System.Eve
ntArgs e = {System.EventArgs}) + 0x36 bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.NotifyEnter() + 0x15
bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.UpdateFocused
Control() + 0x1d9 bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.AssignActiveC
ontrolInternal(System.Windows.Forms.Control value = {Text="Yes"
Checked=true}) + 0x26 bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.ActivateContr
olInternal(System.Windows.Forms.Control control = {Text="Yes" Checked=true},
bool originator = false) + 0xf0 bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.SetActiveCont
rolInternal(System.Windows.Forms.Control value = {Text="Yes" Checked=true})
+ 0xf2 bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.SetActiveCont
rol(System.Windows.Forms.Control ctl = {Text="Yes" Checked=true}) + 0x30
bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.set_ActiveCon
trol(System.Windows.Forms.Control value = {Text="Yes" Checked=true}) + 0x10
bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.Select(bool directed
= true, bool forward = true) + 0x30 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.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.Cont rol.SelectNextIfFocused()
+ 0xaa bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.set_Enabled(bool
value = false) + 0x4b bytes

This really is strange behaviour. Has anyone else encountered anything like
this?

TIA
Nov 21 '05 #1
3 1491
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

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

Nov 21 '05 #2
Found it was because I was firing button.enabled=false on a worker thread
instead of the thread where the button was created. Ouch!

""Peter Huang"" <v-******@online.microsoft.com> wrote in message
news:la**************@cpmsftngxa10.phx.gbl...
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

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

Nov 21 '05 #3
Hi

I am glad that the problem is resolved.
Cheers!

Best regards,

Peter Huang
Microsoft Online Partner Support

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

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
I have radio buttons on a form, and when the user makes the selection, it will trigger the event and send the form to the web server and print the selected value. In Case 1, I just use submit...
3
by: John Davis | last post by:
I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons. When the user click the first radio button, the text will change to uppercase. If the user clicks the other radio button,...
5
by: tshad | last post by:
Is there a way to allow a user to press a radio button if it is already selected? There is an onCheckedChanged event that fires when the person presses the button and it is isn't selected...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
2
by: Gummy | last post by:
Hello, I have a user control that has radio buttons and a listbox. This user control is repeated several time on my webpage. What I want to do is alert the main page that the radio buttons...
0
by: Gummy | last post by:
Hello, I have a user control (contains two listboxes, labels and radio buttons) that appears on my webpage multiple times. When the radio buttons are clicked I am able to process (consume?) that...
19
by: Daniela Roman | last post by:
Hello, I try to fire an event under a button click event and maybe anybody can give a clue please. I have let's say a WEB grid with PageIndexChanged event: private void...
1
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two...
3
by: Steve Swift | last post by:
I have a page containing: <FORM NAME=radios> <INPUT TYPE=RADIO NAME=RAD VALUE=1 ID=RAD1> <LABEL FOR=RAD1>Check One</LABEL> <A onClick="document.radios.RAD.checked=false; return false">Uncheck...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.