Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login Security
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00009470
Message ID:
00009483
Vues:
38
>>>My application requires logon security at the form level. An easy way to do this is by creating a login class based on a form class and instantiating the class during the init() of the form that needs to be opened. If the user doesn't provide the right password, the init() returns false. Is there a way that would require less coding? I have only 16 hours to contract this. Any help appreciated.
>>
>>what I use is to have the base classes include 2 additional
>> propertiey viewlevel and changelevel these holds the security level needed for viewing and/or changing the widget
>> when a user logs into the system he gets his level and all the forms
>> /menus etc are viewd according to the level
>>
>>Arnon
>Both yours and Michel's suggestions have helped me out alot. I tried the suggestion Michel gave me.
>
>LOGIN FORM CREATION:
>I created a login form. This form has a property called llProceed1 (logical). In the unload of the login form, it returns the logical value of llProceed1. llProceed1 is set to T or F based on the correct password checked when user hits "OK" on the form.
>
>TEST FORM CREATION:
>I created a test form. In the init() event of the test form is this code:
>DO FORM login TO llProceed2. This means that when the login form returns its llProceed1 value in the unload event, it will be assigned to llProceed2. If llProceed2 is false (we are still in the original test form's init() event) it will return false destroying the form.
>
>QUESTION: How do I get this to work with classes. I want to make the login a class, but I can't use the DO FORM command then.


Why not? 'Do Form name linked' will assign the form to a memvar & then it will behave much like a class. The 'real' difference between a Form & a Class is that in a Form the Show() method is automatically fired. In a class you must manually fire it.

HTH,
Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform