Senin, 04 Maret 2013

Cara membuat form login dengan Delphi 7.

Buat teman-teman yang lagi asiiik membuat program khususnya yang berhubungan dengan Sistem Informasi Administrasi untuk sebuah instansi atau perusahaan dengan menggunakan soft Delphi 7 rasanya  kurang  lengkap kalau tidak ada halaman login. (itu menurutku siii).
Untuk keamanan data yang kita miliki dalam sistem, halaman login ini sangat penting untuk sebuah sistem Administrasi yang  kita buat, karena SI sifatnya sangat rahasia. Halaman login yang aku buat ini berisi Nama Pemakai  dan Password.
Buat teman-teman yang lagi belajar atau lagi nyari – nyari tutorial tentang pemrograman Delphi, mungkin postingan ini bisa bermanfaat buat kalian, ya meskipun hanya program sederhana.
Terlebih dahulu kita buka program yang sudah kita buat sebelumnya. Kalau mau buat baru juga boleh.
Sebagai contoh punyaku adalah SI LKP PIKOM. . .





untuk teman-teman yang mau buat baru dari awal juga boleh, silahkan telusuri langkah-langkahnya. . . :)
1. Buka aplikasi Delphi yang kamu  gunakan yaitu delphi 7 dan buat lembar kerja baru dengan mengklik pada menu File | New |Form







2. Setelah muncul lembar kerja baru, pada formulir baru tersebut lakukan perubahan terhadap dua buah properties yang ada pada objek inspector berikut:
Properties Caption diisi dengan Login Admin
Properties Name diisi dengan FormAwal (tanpa spasi)










Lalu simpanlah dengan memilih File|Save dan berikan nama FAwal.
3. Setelah FAwal disimpan, selanjutnya kita menambahkan komponen. Kita perlu menambahkan lima buah komponen pada Form yaitu:
Dua buah komponen Label yang simbolnya  pada tab standard ke dalam form baru kamu. Dan kemudian ubah nama label tersebut sesuai dengan keinginan kamu.
Untuk mengubah nama label tersebut, kita ubah pada  properties caption kemudian ubah nama label tersebut. Contoh punyaku adalah Nama Pemakai  dan Password.
4. Setelah label jadi  letakkan dua buah komponen Edit  yang simbolnya  terletak pada tab yang sama dimana kamu mengambil label tadi, kemudian yang perlu kita atur pada properties yaitu properties name,text dan Password Char.
Punyaku  untuk
Edit1
Name diganti dengan EdNama
Text dikosongkan
PasswordChar tetap dengan #0
Edit2
Name diganti dengan EdPass
Text dikosongkan
PasswordChar dirubah dengan *
5. Kemudian masih pada tab yang sama, yaitu pada tab standard tadi, letakkan 1 buah Button yang simbolnya  di bawah Form Edit tadi dengan merubah properties name dan captionnya.
Punyaku  dirubah dengan
Button1
Name dirubah BtnLogin
Caption dirubah &Login
Berikut contoh peletakan pada form Login :

6. Setelah form jadi, untuk melaksanakan pemeriksaan terhadap password, kamu perlu menambahkan kode pada kejadian OnClick milik tombol Login. Klik ganda pada tombol Login dan tambahkan kode seperti dibawah ini:
procedure TFormAwal.Button1Click(Sender: TObject);

begin

if(EdNama.Text = 'idahceris') and

(EdPass.Text = 'senyum') then

FormMenu.ShowModal

Application.MessageBox('Maaf anda tidak bisa Login. . .!!','Warning’,0);

exit;

end;
end.
Kode diatas mengasumsikan bahwa nama pemakai adalah idahceris dan password-nya adalah senyum. Jika tidak terjadi kecocokan, kotak dialog yang berisi pesan “Maaf anda tidak bisa login” akan tampil.
7. sekarang coba kamu jalankan form yang sudah kamu  buat tadi. . .good luck yah?
note :
FormMenu.Show Modal berfungsi jika password dan nama pemakai  yang kamu  inputkan benar,maka tampil Form selanjutnya yang menjadi form tujuan yaitu FormMenu. Silahkan anda rubah sesuai dengan nama form yang kamu buat.

3 komentar:

mengatakan...

A tooth (plural teeth) is a cheap, calcified, whitish form found in the jaws (or mouths) of innumerable vertebrates and habituated to to defeat down food. Some animals, explicitly carnivores, also take teeth for the purpose hunting or instead of defensive purposes. The roots of teeth are covered by means of gums. Teeth are not made of bone, but degree of multiple tissues of varying density and hardness.

The general structure of teeth is similar across the vertebrates, although there is of distinction modulation in their fabric and position. The teeth of mammals drink serious roots, and this decoration is also initiate in some fish, and in crocodilians. In most teleost fish, manner, the teeth are spoken for to the outer outside of the bone, while in lizards they are attached to the inner interface of the jaw during a man side. In cartilaginous fish, such as sharks, the teeth are joined by means of perplexing ligaments to the hoops of cartilage that construct the jaw.



mengatakan...

Today’s houses are larger and more costly than ever. They burden our reasonable resources. After they are built they section an ever-growing burden on our pocketbooks and verve resources, because they are not built in an environmentally awake way.


http://www.hellima.edu.pl/firmy/hotel,opera,szkolenie,w,sopocie,s,4284/
http://stripercup.com/viewtopic.php?f=3&t=15960&start=0&st=0&sk=t&sd=a&view=print
http://www.njagaro.com.pl/strony,blogi,fora/hotel,opera,konferencje,w,sopocie,s,814/
http://www.sekretyseo.net.pl/firmy/hotel,opera,hotele,sopot,s,3182/
http://www.jurekband.pl/pokaz.php?id=168

http://www.dhauda.edu.pl/firmy/hotel,opera,hotele,sopot,s,4337/
http://www.cristallo.com.pl/strony,blogi,fora/hotel,opera,noclegi,w,sopocie,s,1025/
http://www.onisa.com.pl/strony,blogi,fora/hotel,opera,wesele,sopot,s,804/
http://www.linseo.net.pl/firmy/hotel,opera,wesele,sopot,s,3191/
http://www.oczat.com.pl/strony,blogi,fora/hotel,opera,wesele,sopot,s,805/

mengatakan...

A tooth (plural teeth) is a mignonne, calcified, whitish form found in the jaws (or mouths) of multitudinous vertebrates and worn to break down food. Some animals, strikingly carnivores, also use teeth for the purpose hunting or owing defensive purposes. The roots of teeth are covered nearby gums. Teeth are not made of bone, but rather of multiple tissues of varying density and hardness.

The community make-up of teeth is nearly the same across the vertebrates, although there is of distinction converting in their form and position. The teeth of mammals get profound roots, and this figure is also create in some fish, and in crocodilians. In most teleost fish, however, the teeth are attached to the outer surface of the bone, while in lizards they are fastened to the inner interface of the jaw by the same side. In cartilaginous fish, such as sharks, the teeth are unavailable around tough ligaments to the hoops of cartilage that construct the jaw.



 
Design by http://eksperimen007.blogspot.com/ | Bloggerized by Yoksin Yonathan