It seem so, when I tried it with the Textbox control it's working, but it doesn't seem to be when used in a UserControl inheriting a Textbox... :(
Printable View
It seem so, when I tried it with the Textbox control it's working, but it doesn't seem to be when used in a UserControl inheriting a Textbox... :(
Can you show us the code you're using? SelectNextControl is supposed to shift focus to the next control in the tab order. is that what you're trying to do? I'm not sure but I think it will also only select controls with TabStop set to True, or at leats by default. Does that sound like it would make any difference. Also, is this a UserControl or not? A UserControl inherits UserControl, while an inherited TextBox would be considered a custom control. If you have a UserControl that doesn't expose its constituent controls publicly then I'm not sure how SelectnextControl would behave. You'd think that it would still visit every control but I'm not sure.
You may call it custom control since I just added a UserControl then replaced the inheritance with Textbox. I don't the code right now but its something like...
Not sure how many true are there but I have set all the boolean parameters to true, with an ordinary textbox it's working but not with the custom control. And when I try Sendkeys("Tab") it's working though I don't want to use SendKeys, it's just weird...Code:SelectNextControl(sender as TextBox, true, true, true, true)