Tuesday, February 20, 2018

Database Driven Login System with Username Display in Microsoft Visual Foxrpo

This is a database drive login system with username display that I wrote using Microsoft Visual Foxpro. Writing this program is much easier company to other programming language that I used before maybe because Microsoft Visual Foxpro was designed to be database centered language. You can write a complete database application with only a few codes.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.





Table Structure and Sample Records










Sample Program Output


Program Listing


Password Form

Object: Form1   Procedure: Init
=====================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus

 
 Ok Button
 
 Object: Command1 Procedure: Click
 ========================================
 
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) =  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
       
        IF FOUND() then
           DO form menu 
            thisform.Release
            thisform.Hide
            RETURN .t.
        endif

if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Cancel Button
 
 Object: Command2 Procedure: Click
 ========================================
 
 
thisform.Release


Menu Form

Object: Form1 Procedure: Init

SELECT users

fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname

Close Button

Object: Command1 Procedure: Click
=========================================
 
thisform.Release
thisform.hide
DO FORM password




No comments:

Post a Comment