Thursday, July 23, 2009

Vacation 2009, Högsby, Sweden


A view to remember, a sunset by the lake.

Tuesday, July 07, 2009

vb.net Radiobutton TabIndex problem

I spend 8 hours trying to understand why my dynamically GUI in VB2005 didn't work as expected if I selected a radiobutton ctrl (On/Off) it would set it to On (tabindex=0 for the On button).
If I had more than one (ON/Off) button created it would only set the first to On.

Its due to that VB set focus on the ctrl with tabindex=0 and if the radiobutton get focus it will generate a CheckedChanged event!
Made the same test in VB6 here it works as expected, if you got 2 radiobuttons on a form the on checked will get the focus and not the first in tabindex.

Workaround: Add a button to the form, set tabindex=0, height=1 and width=1.
Now when the form is created the focus will be on the invisible button.

Test the bug:
Create a form with 2 radiobuttons Rb1 and Rb2, check Rb2 radiobutton.
Run the program, now radiobutton Rb1 will be Checked instead of Rb2.

MySQL to MariaDB

 Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...