|
-
Nov 22nd, 2014, 04:44 PM
#1
Thread Starter
PowerPoster
-
Nov 22nd, 2014, 09:01 PM
#2
Re: TabControl - Focus Control - Form Load
You can't focus anything in the Load event handler because the form isn't actually visible at that stage. No matter what you do in the Load event handler, the first selectable control in the Tab order will be focused when the form is displayed. Unless you manipulate the Tab order, you need to handle the Shown event, which is raised immediately AFTER the form is displayed.
-
Nov 22nd, 2014, 10:18 PM
#3
Thread Starter
PowerPoster
Re: TabControl - Focus Control - Form Load
I didnt even realize there was a shown event. Learned something new. Issue resolved. Thanks for the pointer.
-
Nov 22nd, 2014, 11:58 PM
#4
Re: TabControl - Focus Control - Form Load
 Originally Posted by BrailleSchool
I didnt even realize there was a shown event.
There wasn't originally so you had to mess about with the Activated event and check whether it was the first time it had been raised. I think Shown was added in .NET 2.0.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|