J Trahair
Well-known member
Hi. In VB.Net 2005 I have a login form where the user enters his username and password on beginning to run the VB app. The login form is called from the Shown event of the form called at StartUp.
frmLogin is set as Fixed3D, and TopMost = True, and the first textbox is TabIndex = 0 and TabStop = True. The cursor evens flashes in the textbox.
However, when another program is running eg. AVG Anti Virus, Word etc., the focus is lost but the frmLogin 'looks' live. When the user types something into the user name box, what they type appears somewhere in the other program not in the frmLogin.
Is there a way of forcing focus back to frmLogin? I tried a timer and Me.BringToFront every 1/10th of a second, but no success.
Otherwise, the user has to find the mouse and click on the frmLogin before trying again.
VB.NET:
frmLogin.ShowDialog()
However, when another program is running eg. AVG Anti Virus, Word etc., the focus is lost but the frmLogin 'looks' live. When the user types something into the user name box, what they type appears somewhere in the other program not in the frmLogin.
Is there a way of forcing focus back to frmLogin? I tried a timer and Me.BringToFront every 1/10th of a second, but no success.
Otherwise, the user has to find the mouse and click on the frmLogin before trying again.