954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Next control gets turned on when previous button is clicked

I am relatively new to vb.net but have many years of programming experience.

I am seeing a behavior that I do not understand using vb.net 2005 on a windows form.

You have a command button and some radio option buttons on the same form. ie
Go button, followed by 3 radio optins ByDate, ByRefNo, None. The none radio is marked checked at design time.

You click on Go and the ByDate radio becomes checked.

I have seen this behavior in another program but instead of a button control it was a file list box that was has a click event and a dbl_click event.

Why would the next radio button be turned on with clicking on it and there is no code to turn it on?????

Thanks

QuickBooksDev
Light Poster
47 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

by check : if Bydate radio is checked you can add code to turn on the next radio button. so when you click Go button once byDate radio will be turn on then you click Go button again. the program will check if bydate is turned on then checked the next radio button.

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

The question is why does it get turned on when the previous command button is hit.

I cannot add code to switch the radio button because the user has hit 'GO' for the program to do it's thing and now ByDate is checked when it was never hit. There is no need to hit the Go button twice since the program did it's thing.

Also I have no idea if the ByDate is checked by the User or by this quirk in VB to know to turn it off or not.

It seems that it is jumping from the Go button to the next control (via TabIndex) and that is turning it on???????

QuickBooksDev
Light Poster
47 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You