Try this just to see if it works. Use a timer to re-execute the activation of the form. The problem could be that all of this is trying to execute on the same thread and so the re-activation never takes place. Also, this is not an issue with SF, it has 100% to do with the way WinForms works.
InfoBox()'-- You can reduce this to a smaller interval, but starting with 1 second will give you a good visual when it executes.MyTimer.Interval = 1000 MyTimer.Enabled = True
Timer CodeMyTimer.Enabled = False'-- You might try just forcing the focus back to the control itself first. You could then try' All of the other options previously mentioned in this thread if it doesn't work.MyControlToFocus.Focus()
Dim InfoboxTimer As New Timer()InfoboxTimer.Interval = 50 'the min value that work ok for me...AddHandler InfoboxTimer.Tick, AddressOf InfoboxTimer_TickInfoboxTimer.Enabled = TrueMicroFour.StrataFrame.Messaging.InfoBox.DefaultTimeOut = 1000MicroFour.StrataFrame.Messaging.InfoBox.NotifyBox("Title","description")
'Timer_Tick handlerPrivate Sub InfoboxTimer_Tick(ByVal sender As Object, ByVal e As EventArgs) Dim Tmr As Timer = CType(sender, Timer) Tmr.Enabled = False Me.ParentForm.Activate() 'I coding on a user control... activate his form 'Me.txtCodigo.Focus()End Sub