In my code I want to open a form to let the user enter his
username/password. When he click on the OK button there will be some
authentication and the I want to return TRUE or FALSE back to the form that
initiated the login form.
How can I do that?
Try
Dim frm As New Loginscreen
frm.Show() '<<--- wait here until the user click OK in the form
???
Return frm.UserSid
Catch ex As Exception
Return AUTHENTICATION_FAILED
End Try
Jim Hughes - 20 Sep 2004 14:20 GMT
Look at the docs for ShowDialog and DialogResult
> In my code I want to open a form to let the user enter his
> username/password. When he click on the OK button there will be some
[quoted text clipped - 13 lines]
> Return AUTHENTICATION_FAILED
> End Try
Imran Koradia - 20 Sep 2004 14:23 GMT
try using frm.ShowDialog instead..
Imran.
> In my code I want to open a form to let the user enter his
> username/password. When he click on the OK button there will be some
[quoted text clipped - 11 lines]
> Return AUTHENTICATION_FAILED
> End Try
Gene Vangampelaere - 20 Sep 2004 14:49 GMT
Indeed, I must use showdialog instead of show()
thx!
> In my code I want to open a form to let the user enter his
> username/password. When he click on the OK button there will be some
[quoted text clipped - 11 lines]
> Return AUTHENTICATION_FAILED
> End Try