Home
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
 
 
 
 
TitleKeep track of the last control to have the focus
Keywordsfocus
CategoriesControls
 
In each control's GotFocus event handler, save the current and last controls to have focus.
 
Private Sub Text2_GotFocus()
    Set LastControl = CurrentControl
    Set CurrentControl = Text2

    ShowControls
End Sub
 
Alternatively you could save each control's name in its LostFocus event handler.

See also Keep track of the last control to have the focus before a button is pressed.

 
 
Copyright © 1997-2001 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated