Pertama-tama buatlah Project dengan nama Latihan 1. Dan simpan menjadi:
C:\Latihan Foxpro\Latihan1.pjx
disainlah form seperti berikut:
Properties:
- AutoSize = .T. - True
- Caption = "Toko Aksesoris Motor"
- FontSize = 20
- FontBold = .T. - True
Properties:
- AutoSize = .T. - True
- Caption = "Kode"
Properties:
- AutoSize = .T. - True
- Caption = "Nama"
Properties:
- AutoSize = .T. - True
- Caption = "Harga"
Properties:
- AutoSize = .T. - True
- Caption = "Jumlah"
Properties:
- AutoSize = .T. - True
- Caption = "Total"
Properties:
- Caption:/
Properties:
- Caption:/
Setelah Mendisain baru memberikan perintah kontrol untuk beberapa objek pada form tersebut.
Kasus:
- Ketika tombol "Hitung" ditekan, maka pada Total (Text5) akan menampilkan hasil perkalian antara harga * Jumlah
- Ketika tombol "Keluar" ditekan, maka program akan keluar
Analisa:
Karena aksi terjadi karena tombol hitung ditekan, maka berikan perintah tersebut pada bagian object tombol "Hitung" yaitu pada
No comments:
Post a Comment