arrow keys acting like tab key on controls added at runtime
Posted on 2003-03-20
Hi, Here's my code... I add a usercontrol to a form at runtime and add textboxes to a frame on the usercontrol. When the form loads however, the arrow keys on these textboxes act like tabs, moving the cursor to the next textbox. When user clicks on another control (added at design time) on the screen and come back to the textboxes, the arrow keys start behaving fine.
Any idea why this may occur, and how I could fix it?
Private WithEvents MyEditor As VBControlExtender
Set MyEditor = MyForm.Controls.Add("ctlMyUserControl", "MyEditor")
MyEditor.Visible = True
MyEditor.object.Controls.Add "VB.TextBox", "txtName", MyEditor.object.Controls("frameUserInfo")
MyEditor.object.Controls.Add "VB.TextBox", "txtAddress", MyEditor.object.Controls("frameUserInfo")