“Membuat Aplikasi Matematika Sederhana dg Ms Visual FoxPro 6.0”

| |

Preview
Gambar 1. Perancangan Form Operasi Matematika
  
   Ubahlah Properties Sebagai berikut :
 
Object
Properties
Setting
Form1
Caption
Operasi Matematika
Name
Form1
Picture
Browser your image
Label1
Alignment
Center
AutoSize
True
BackStyle
Transparent
Caption
Operasi Matematika
FontBold
True
FontName
Viner Hand ITC
FontSize
20
Label2
BackStyle
Transparent
Caption
Nilai A
FontBold
True
FontName
Times New Roman
FontSize
12
ForeColor
168,255,255
Label3
Caption
Nilai B
Label4
Caption
Hasil
Text1
Name
TxNlaiA
Text2
Name
TxNlaiB
Text3
Name
TxHasil
Command1
AutoSize
True
Caption
( * )
FontBold
True
FontName
Comic Sans MS
Name
Command1
Command2
AutoSize
True
Caption
( / )
FontBold
True
FontName
Comic Sans MS
Name
Command2
Command3
AutoSize
True
Caption
(+ )
FontBold
True
FontName
Comic Sans MS
Name
Command3
Command4
AutoSize
True
Caption
( - )
FontBold
True
FontName
Comic Sans MS
Name
Command4
Command5
AutoSize
True
Caption
Clear
FontBold
True
FontName
Comic Sans MS
ForeColor
0,128,128
Name
CmdClear
Command6
AutoSize
True
Caption
Exit
FontBold
True
FontName
Comic Sans MS
ForeColor
0,128,128
Name
CmdExit
Container1
BackColor
0,151,151
BorderColor
64,0,128
Container2
BackColor
0,151,151
BorderColor
64,0,128

  Tabel 1. Properties Form Operasi Matematika

*Kode Program*
Object: ( * )
Procedure: Click
  thisform.TxHasil.value=val(thisform.TxNlaiA.value)*val(thisform.TxNlaiB.value)

Object : ( / )
Procedure: Click
  thisform.TxHasil.value=val(thisform.TxNlaiA.value)/val(thisform.TxNlaiB.value)

Object : ( + )
Procedure: Click
  thisform.TxHasil.value=val(thisform.TxNlaiA.value)+val(thisform.TxNlaiB.value)

Object : ( - )
Procedure: Click
  thisform.TxHasil.value=val(thisform.TxNlaiA.value)-val(thisform.TxNlaiB.value)

Object : Clear
Procedure: Click
  thisform.TxNlaiA.value=""
  thisform.TxNlaiB.value=""
  thisform.TxHasil.value=""
  
  thisform.TxNlaiA.setfocus()

Object : Exit
Procedure: Click
  thisform.release

0 komentar:

Posting Komentar