problem when opening a form
-
Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus on that button but you wouldn't know it by looking at it (the dotted rectangle isn't there). I noticed that when the Tab key was pressed, the newly focused button will highlight, so when opening the form, I focused on the button next to the one I want focused and did a
SendKeys.Send("{Tab}");
. This works if the current tab page is the one in focus (I have another "screen" on that same tabpage where I can press an Exit button to return to the original screen), but it refuses to work when that tabpage is first opened - when tabbing into the page from another or opening the form. I'm completely out of ideas around this problem. Anyone know what I could do? :confused: Thanks so much for any help!!! Mel -
Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus on that button but you wouldn't know it by looking at it (the dotted rectangle isn't there). I noticed that when the Tab key was pressed, the newly focused button will highlight, so when opening the form, I focused on the button next to the one I want focused and did a
SendKeys.Send("{Tab}");
. This works if the current tab page is the one in focus (I have another "screen" on that same tabpage where I can press an Exit button to return to the original screen), but it refuses to work when that tabpage is first opened - when tabbing into the page from another or opening the form. I'm completely out of ideas around this problem. Anyone know what I could do? :confused: Thanks so much for any help!!! MelYour solution looks like a hack. Did you try setting the TabIndex property in the Designer to set the right Tab order? Regards Senthil _____________________________ My Blog | My Articles | WinMacro