To get the child window of MDI page in focus on pressing ALT TAB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kishorparmar
    New Member
    • Dec 2012
    • 1

    To get the child window of MDI page in focus on pressing ALT TAB

    I have MDI form which contains mutliple tabs and each tab has its own child form . When user presses ALT TAB from the from to other application its fine but when users presses ALT TAB back to my application it should keep focus on child form last time it was selected.
    Any help would be appreciated
  • adriancs
    New Member
    • Apr 2011
    • 122

    #2
    this.LostFocus +=
    this.GotFocus +=

    use
    ChildForm.Activ ate()
    to get focus

    when childform gotfocus()
    cache or log it
    you can store it in a public value, or list

    when MainForm gotfocus
    look the public value or list to get last focus mdi child form

    for example, if the child form is named form2
    then
    form2.Activate( )

    Comment

    Working...