Hello,
My application makes use of multiple forms. The problem is that if one form
is loaded and shown, and I close this form to go back to the previous form,
the previous form is displayed, but sometimes the focus is returned to a
background app, and not the main app.
My code to show the next form:
Private Sub btnStock_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnStock.Click
Dim frmStockGUI As New frmStock
Me.Hide()
frmStockGUI.btnStockCreate.Select()
frmStockGUI.ShowDialog()
Me.Show()
btnStock.Focus()
End Sub
I even set the focus to a button on the main form, but no luck :-(
Any ideas?
Kind regards,
Pieter Kruger