View Single Post
  #6 (permalink)  
Old July 26th, 2004, 12:06 PM
marcostraf marcostraf is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use SetFocus only if the component is visible, but because the form is still invisible during the Load event that code will not work. Put it in any of these evnets: Activate, Paint, Resize. Use a static boolean to do it only once:

public Form_XXX
static bSkip as boolean
if not bSkip then
txt.SetFocus
bSkip=true
endif
Reply With Quote