Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Login Screen Help
Message
From
28/01/2004 19:42:13
 
 
To
28/01/2004 18:07:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00871598
Message ID:
00871621
Views:
50
In your main prg when you call the login screen, you can have the login screen return a value, like True or False depending on whether or not the login was successful.

There a few ways to do this...probably the easiest (but not necessarily the best) is to set a private variable to false prior to calling your modal login screen. The code in your login screen that does the username/password checking should set the variable to True if the login succeed.

When program execution returns to the main program, you can simply check the value of this variable and then either quit (if login was unsuccessful) or go on to opening your menu and setting up a logo.

something like this:

* Main Prg or method

PRIVATE llSuccess
DO FORM login && this form should be modal for this to work

IF llSuccess
* display logo - something like _screen.icon= Mylogo.Ico
* Build the menu
* etc.
ELSE
QUIT
ENDIF

Like many things in VFP, you can accomplish this several different ways - this is just one of them.

Goodluck,
Al

>I am needing a little assistance with how proceed. Here's the code that is in my setup.prg (main program)
>
>do form login.scx
>
>Once the login form opens, I would like to opne up a logo screen to serve as a background and open my menu bar. Here's the code that behind the Ok button of the Login screen:
>
>oVar.UserIdText = ALLTRIM(ThisForm.Ttextcls1.Value)
>oVar.UserPwdText = oPro.Encrypt(ALLTRIM(THISFORM.TTextcls2.Value))
>
>&&Now Check for valid user id/password
>m.lcGood = .F.
>
>m.lcGood = oPro.Verify(oVar.UserIdText,oVar.UserPwdText)
>
>IF m.lcGood = .T.
> oVar.LoginOk = .T.
> && Valid User, Release login form, load logo screen and start menu
> && Start tracking user status from here--
> thisform.release()
>ELSE
> oVar.LoginOk = .F.
> && Invalid user, display message box
>ENDIF
>
>My question is, upon a successful login, how do i cleanly close the login screen and open up a logo screen in addition to my menu bar?
Previous
Reply
Map
View

Click here to load this message in the networking platform