Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

open form and wait for result

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gene Vangampelaere - 20 Sep 2004 09:22 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.