New Software
Medical Dictionary Lihat Detail





Active@ Boot Disk
Lihat Detail













New Software

Pengikut

facebook

membuat program kearsipan bag.2 "membuat form frmuser"

Membuat Form
Membuat Form frmuser
1. Membuat form frmuser
Form frmuser merupakan suatu objek yang digunakan untuk
memasukkan/menginput record, dimana record tersebut akan disimpan kedalam
tabel userpass.dbf. Langkah-langkah pembuatannya sebagai berikut :
1. klik tab Documents pada Project Manager - prjarsip
2. klik Forms dan klik New
3. klik New Form
4. buat rancangan form sebagai berikut :


5. mengatur objek-objek yang ada pada form frmuser

No

Object

Properti

Nilai

1

Form1

Autocenter

BorderStyle

Caption

MaxButton

MinButton

Showwindow

Windowtype

.T.

2 – Fixed Dialog

BAPD

.F.- False

.F.- False

1 – In Top-Level Form

1 – Modal

2

Label1

Caption

Pembuatan Password

3

Label2

Caption

Id User

4

Label3

Caption

Nama

5

Label4

Caption

Sandi

6

Label5

Caption

Hak

7

Label6

Caption

Jabatan

8

Text1

Name

Txtid_user

9

Text2

Name

Txtnama


Text3

Name

txtsandi


Combo1

Name

RowSource

Combo1

Userpass.id_user


Combo2

Name

RowSource

Style

Combo2

1,2,3,4,5

2 – Dropdown List


Combo3

Name

RowSource

Style

Combo3

Bidang Jasa Teknis dan Kelembagaan Kearsipan,Bagian keuangan,Bagian Kepegawaian,Bagian Program,Bid. Pengelolaan Arsip In-Aktif,Bid. Pengelolaan Arsip Statis,Pelayanan Umum,Kepala Badan Arsip

2 – Dropdown List


Command1

Caption

DisabledPicture

DownPicture

Name

Picture

Simpan

c:\arsip\icon\simpan2.png

c:\arsip\icon\simpan2.png

Command1

c:\arsip\icon\simpan1.png


Command2

Caption

DisabledPicture

DownPicture

Name

Picture

Batal

c:\arsip\icon\batal2.png

c:\arsip\icon\batal2.png

Command2

c:\arsip\icon\batal1.png


Command3

Caption

DisabledPicture

DownPicture

Name

Picture

hapus

c:\arsip\icon\hapus2.png

c:\arsip\icon\hapus2.png

Command3

c:\arsip\icon\hapus1.png


Command4

Caption

DisabledPicture

DownPicture

Name

Picture

Keluar

c:\arsip\icon\keluar2.png

c:\arsip\icon\keluar2.png

Command4

c:\arsip\icon\keluar1.png


Vfpskin21

rskin

skinname

.T.

SerenXP


Shape1

BackColor

BorderStyle

Name

0,128,255

0 - Transparent

Shape1


Khusus untuk kontrol VFP-Skin 2.0 yang berada tepat di atas tulisan
Pembuatan Password merupakan visual class library. Setelah anda memilih
objek tersebut dari form control toolbar, kemudian letakkan pada posisi mana
saja yang anda kehendaki.


6. menulis script program

object: form1 procedure: load

SET PROCEDURE TO PROSEDUR && memanggil prosedur
SET TALK OFF
SET CENTURY ON
SET DELETED ON
SET DATE ITALIAN

use userpass && memanggil atau menggunakan tabel user pass
SET ORDER TO id_user

object: form1 procedure: unload

SET DELETED OFF
USE
CLOSE TABLES ALL

object: form1 procedure: batal

THISFORM.txtId_user.VALUE=""
THISFORM.TXTNAMA.VALUE=""
THISFORM.TXTSANDI.VALUE=""
thisform.COMbo1.DisplayValue=""
thisform.combo3.DisplayValue=""

object: form1 procedure: simpan

A1 = THISFORM.txtId_user.VALUE
A2 = THISFORM.TXTNAMA.VALUE
A3 = TRIM(ENCRYPT(15,THISFORM.TXTSANDI.VALUE,2))
A4 = thisform.COMbo1.DisplayValue
A5 = thisform.combo3.DisplayValue

IF ! SEEK(A1)
INSERT INTO USERPASS (ID_USER,NAMA,SANDI,HAK,Bagian);
VALUES (A1,A2,A3,A4,A5)
ELSE
UPDATE USERPASS;
SET ID_USER=A1,NAMA=A2,SANDI=A3,HAK=A4,Bagian=A5;
WHERE ID_USER=A1
ENDIF
THISFORM.Batal
THISFORM.txtId_user.SETFOCUS

object: form1 procedure: tampil

THISFORM.txtid_user.Value=ID_USER
THISFORM.TXTNAMA.Value=NAMA
THISFORM.TXTSANDI.Value=SANDI
THISFORM.combo1.DisplayValue=HAK
THISFORM.combo3.DisplayValue=bagian


object: txtid_user procedure: valid

IF ! EMPTY(THISFORM.txtId_user.Value)
SEEK(ALLTRIM(THISFORM.txtId_user.Value ))
IF FOUND()
SET PROCEDURE TO PROSEDUR
MESSAGEBOX("data sudah ada")
THISFORM.tampil
ENDIF
ENDIF


object: combo1 procedure: valid

IF ! EMPTY(THISFORM.COmbo2.DisplayValue)
SEEK(ALLTRIM(THISFORM.COmbo2.DisplayValue ))
IF FOUND()
SET PROCEDURE TO PROSEDUR
THISFORM.tampil
ENDIF
ENDIF

object: command11 procedure: click

thisform.simpan

object: command12 procedure: click

thisform.batal

object: command13 procedure: click

WITH THISFORM
PESAN=MESSAGEBOX("YAKIN DIHAPUS",4+32,"KONFIRMASI")
IF PESAN=6
DELETE FOR id_user = THISFORM.txTid_user.VALUE
.batal()
.txTid_user.SETFOCUS
ENDIF
ENDWITH
THISFORM.Refresh

object: command14 procedure: click

UNLOCK all
LOCAL Tinggi, Mulai
Tinggi=(THISFORM.HEIGHT/50)
FOR Mulai=1 TO Tinggi
THISFORM.HEIGHT=THISFORM.HEIGHT - 50
THISFORM.TOP=(_SCREEN.HEIGHT-THISFORM.HEIGHT)/2
THISFORM.WIDTH=THISFORM.WIDTH - 50
THISFORM.LEFT=(_SCREEN.WIDTH-THISFORM.WIDTH)/2
DOEVENTS
NEXT Mulai
THISFORM.Release

7. Menjalankan Program

membuat program kearsipan bag.2 "membuat form frmuser"SocialTwist Tell-a-Friend
Computers Web Directory
Blog Directory Dr.5z5 Open Feed Directory Computers (Linux) - TOP.ORG blog search directory Blog Search: The Source for Blogs free web site traffic and promotion
MyFreeCopyright.com Registered & Protectedintellectual property