DOCUMENT:Q190682 11-DEC-1999 [foxpro] TITLE :HOWTO: Use the Password Dialog Box Foundation Class PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:6.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 6.0 ------------------------------------------------------------------------------- SUMMARY ======= This article describes how to work with the Password Dialog Box Foundation Class included in Visual FoxPro Windows 6.0. MORE INFORMATION ================ _login is the Password Dialog box class and it is stores in the _dialog.vcx class library. The properties and methods that you will need to set up a Password Dialog box include cFieldName, cPassword, cTable, cDBFName and the Setup method. The cTable property contains the alias name of the user password table. The CDBFName property contains the actual filename of the user password table with a qualified path. The cPassword property contains the name of the field where the user password is stored. The CFieldName property contains the name of the field storing the user name. The Setup method is to set up the RowSource for the username drop-down list box. Sample Code ----------- * The following sample code creates a table with username and * password. CREATE TABLE cust ( username C(15), cpassw C(6)) INSERT INTO cust (username, cpassw) VALUES ("Smith","bird") INSERT INTO cust (username, cpassw) VALUES ("Tim","dog") INSERT INTO cust (username, cpassw) VALUES ("Robert","mouse") INSERT INTO cust (username, cpassw) VALUES ("Tina","cat") PUBLIC passobj CLOSE TABLE ALL * Calls _login from _Dialogs and sets properties for the dialog. * Adjust the path to the class library as needed. passobj = NEWOBJECT("_login",HOME()+"ffc\_dialogs.vcx") passobj.cDBFName = "c:\test\cust.dbf" passobj.cTable = "cust" passobj.cPassword = "cpassw" passobj.cFieldName = "username" passobj.Setup() passobj.SHOW() REFERENCES ========== Visual FoxPro Help; search on: "Visual FoxPro Foundation Classes" (without the quotation marks) Additional query words: kbFC kbVFp600 kbXBase ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbVFP600 Version : WINDOWS:6.0 Issue type : kbhowto ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1999.