Wednesday, February 21, 2018

Login System with User Name With Pictures in Microsoft Visual Foxpro

A login program that I wrote that will allow the user to login and if the user is a registered it will display the username and its pictures. The code is very easy to understand and use that I wrote using Microsoft Visual Foxpro 9.

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
 ========================================

SET DEFAULT TO d:\vfp\password\
 
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
thisform.image1.Picture=TRIM(pixpath)
thisform.image1.Visible= .T.

Close Button

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



DOWNLOAD SOURCE CODE HERE

Tuesday, February 20, 2018

String Palindrome Checker in Visual Foxpro


A very simple program that I wrote using Microsoft Visual Foxpro 9 that will ask the user to give a word and a string and then our program will check if the given word or string is a Palindrome or Not a Palindrome. I provided also a an error checking code if the textbox if empty.

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.






Sample Program Output


Program Listing


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

thisform.text1.Value=""

Check Button

Object:  Command1      Procedure: Click
 ===================================

&& Palindrome Program in Visual Foxpro
&& Written By Mr. Jake R. Pomperada, MAED-IT
&& February 20, 2018    Tuesday  

LOCAL StrOriginal, StrReverse
StrOriginal=allTRIM(UPPER(thisform.text1.value))
StrReverse=""
FOR StrCount=LEN(StrOriginal) TO 1 STEP -1
 StrReverse=ALLTRIM(UPPER(StrReverse))+SUBSTR(StrOriginal,StrCount,1)
ENDFOR 


IF EMPTY(thisform.text1.Value) then
    MESSAGEBOX("Can't be empty.",64,"Reminder")
    thisform.text1.SetFocus
    RETURN .t.
    endif

IF (StrReverse == StrOriginal) then
   thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " is a Palindrome."
   ELSE
   thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " Not a Palindrome."
 ENDIF


 Clear Button

  Object:  Command2      Procedure: Click
 ===================================

WITH thisform
     .text1.value=""
     .label1.caption=""
     .text1.setfocus
endwith


Quit Button

 Object:  Command3      Procedure: Click
 ===================================

thisform.Release






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




Login Security System with Three Attempts in Microsoft Visual Foxpro

In this article I would like to share with you a sample application that I wrote in Microsoft Visual Foxpro 9 it is not yet database driven for this example but shows you how to create a login security to protect your application from intruders. I hope you will find my work useful.  Thank you.

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.







Sample Program Output


Program Listing


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

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus
  
  
  Object: Command1 Procedure: Click
  ========================================
  
  if thisform.txtpassword.value = "123" AND thisform.txtusername.Value="123" then
MESSAGEBOX("Password Accepted")
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
  
  
  Object : Command2             Procedure: Click
  ==============================================
  
  thisform.release
  
  
  






Monday, February 19, 2018

Enrollment System in Microsoft Visual Foxpro

In this article I would like to share with you my very simple enrollment system that I wrote using Microsoft Visual Foxpro 9. I hope you will like my work. Thank you.

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.








Sample Program Output



Program Listing

Table Stucture

student 
============

sid
name
course


subjects
=============
sid
subject
units


form1    Init

m.sid =""
m.sname=""
m.scource=""
m.ssubject=""
m.sunits=0

SET DEFAULT TO D:\vfp\enrollment
WITH thisform
    .txtsid.enabled=.f.
    .txtsname.enabled=.f.
    .txtscourse.enabled=.f.
ENDWITH


New Record Button

WITH thisform 
    .txtsid.value=""
    .txtsname.value=""
    .txtscourse.value=""
    .txtsid.enabled=.t.
    .txtsname.enabled=.t.
    .txtscourse.enabled=.t.
    .txtsid.setfocus
  ENDWITH
  
  
  Save and Update Button
  =====================
  
  SELECT student

LOCATE FOR sid = m.sid

if !found()
   && new record
   if Messagebox("Are you sure to add new record?",32+4,"Confirmation") = 6
   append blank  && add new record
   gather memvar
  endif
 else && update record
       if Messagebox("Are you sure to update existing record?",32+4,"Confirmation") = 6
       gather memvar && overwrite existing record
     endif
  endif

  thisform.grdStudent.refresh
  
  
  Delete Button
  ==============
  
   SELECT STUDENT
SET DELETED on
locate for sid = m.sid
if found()
   
   if Messagebox("Are you sure to delete this record?",32+4,"Confirmation") = 6
   DELETE
    Messagebox("Record Successfully deleted","Information")
      thisform.refresh
  thisform.grdstudent.refresh
  Endif
 ENDIF
  
   thisform.refresh
  thisform.grdstudent.refresh
  thisform.txtsid.Enabled= .F.
  thisform.txtsname.Enabled= .F.
   thisform.txtscourse.Enabled= .F.
  thisform.command1.SetFocus
  
  
  
* Code To Print Single Record
* Written By Mr. Jake R. Pomperada
* February 19, 2017

Print Single Record Button
============================

SELECT Student
SET FILTER TO sid=ALLTRIM(thisform.txtId.Value)
REPORT FORM student_report to PRINTER preview
Thisform.Refresh


Print All Record Button
=========================


SELECT Student

REPORT FORM student_report to PRINTER preview

thisform.Refresh



Form1 Init  for counting of units enrolled
===========================================

SET TALK OFF
SET ECHO OFF
SET CENTURY ON


SET DEFAULT TO D:\vfp\enrollment


thisform.txtName.Value=""

SELECT student
IF !BOF() THEN 
SKIP -1
SET FILTER TO sid = student.sid IN subjects
Select subjects

sum units  to thisform.txtTotalunits.value 
thisform.Refresh
thisform.txtId.SetFocus
ELSE
 MESSAGEBOX("Beginning of Record")
 ENDIF


 Previous Button
 ===============
 
 
thisform.Refresh

SELECT student



IF !BOF() 
SKIP -1
  
 
SET FILTER TO sid = student.sid IN subjects

Select subjects
sum units  to thisform.txtTotalunits.value 
ELSE
MESSAGEBOX("This is the first record.")
thisform.command1.Enabled= .F.
thisform.command2.Enabled= .T.
 
 ENDIF
 thisform.Refresh

 
 Next Button
 ============
 
 
thisform.Refresh
SELECT student
IF  !EOF() THEN 
SKIP 
 
SET FILTER TO sid = student.sid IN subjects
thisform.Refresh
Select subjects
    sum units  to thisform.txtTotalunits.value
ELSE
 MESSAGEBOX("End of Record")
 thisform.command2.Enabled = .F.
 thisform.command1.Enabled= .T.
 ENDIF
 
 Close button
 ===============
 
 thisform.Release
thisform.Hide
DO FORM main_menu




 
 

Friday, February 16, 2018

CRUD Application in Microsoft Visual Foxpro 9

In this article I would like to share with you a simple program that I wrote using Microsoft Visual Foxpro 9 to demostrate CRUD application it can add, edit, delete, view, print and search it is can generate reports and have error correction capability. I hope you will learn something in my program.

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.



About Page





Report Generation and Preview


Table Structure

Sample Records in the Table


Program Listing


Search Button
=============

SELECT demo

thisform.txtT_id.Enabled = .T.
thisform.txtT_id.ReadOnly = .F.

IF  Empty(thisform.txtT_id.Value)
   MESSAGEBOX("Please provide ID Number." + CHR(13) + " Please try again.",0+48,"Reminder")
    
    thisform.txtT_id.Value=""
    thisform.txtT_id.SetFocus
    
   ENDIF


LOCATE FOR t_id = m.t_id
IF FOUND() 
   thisform.txtT_name.Enabled = .T.
   thisform.txtT_id.Value = t_id
   thisform.txtT_name.Value = t_name
   thisform.Refresh
  
  ELSE 
    Messagebox("Record not found Try Again",32,"Reminder") 
    thisform.txtT_id.value = 0
    thisform.txtT_name.value=""
    thisform.txtT_name.Enabled = .F.
    thisform.txtT_id.SetFocus
endif

New button
==========

m.t_id =RECCOUNT()+1
m.t_name=""
thisform.Refresh
thisform.txtT_id.ReadOnly = .T.
thisform.txtT_name.Enabled = .T.

Save Button
===========

select demo

locate for t_id = m.t_id
if !found()
   && new record
   if Messagebox("Are you sure to add new record?",32+4,"Confirmation") = 6
   append blank  && add new record
   gather memvar
  endif
 else && update record
       if Messagebox("Are you sure to update existing record?",32+4,"Confirmation") = 6
       gather memvar && overwrite existing record
     endif
  endif

  thisform.grdDemo.refresh

  Delete Button
  =============

 select demo
SET DELETED on
locate for t_id = m.t_id
if found()
   
   if Messagebox("Are you sure to delete this record?",32+4,"Confirmation") = 6
   delete
  endif
 ENDIF
  m.t_id=""
  m.t_name=""
  thisform.refresh
  thisform.grdDemo.refresh
  thisform.txtT_id.Enabled= .F.
  thisform.txtT_name.Enabled= .F.
  thisform.command1.SetFocus

  Print Button
  ===========

select demo
report form demo to printer prompt preview

Close Button
============

thisform.Release