Click here to Skip to main content
16,023,339 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Could someone explain this sentence clearly? I want to know why for application programmers, use Focus is not better. Thanks.
"Focus is a low-level method intended primarily for custom control authors. Instead,application programmers should use the Select method or the ActiveControl property for child controls, or the Activate method for forms."
Here is the link:http://msdn.microsoft.com/en-us/library/system.windows.forms.control.focus.aspx
You might have to scroll down to see the light yellow note box.
Posted

1 solution

In both cases, you're telling the parent form to focus on the child, instead of telling the child it is focused. This is probably better b/c it's more likely to raise the right events on the Parent, or something like that, I expect.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900