BERIKUT PROGRAM BASIC4ANDROID KU DAN BERIKUT CARA-CARA NYA
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private lblkeliling As Label
Private lblkeliling2 As Label
Private lblkeliling3 As Label
Private lblluas As Label
Private lblluas2 As Label
Private lblluas3 As Label
Private txtalas As EditText
Private txtjari As EditText
Private txtlebar As EditText
Private txtpanjang As EditText
Private txttinggi As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("BangunDatar")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnsegitiga_Click
lblluas.Text = 1.5 * txtalas.Text * txttinggi.text
lblkeliling.Text = 3 * txtalas.Text
End Sub
Sub btnlingkaran_Click
lblluas3.Text = 3.14 * txtjari.text * txtjari.text
lblkeliling3.Text = 2 * 3.14 * txtjari.text
End Sub
Sub btnkotak_Click
lblluas2.Text = txtpanjang.text * txtlebar.text
lblkeliling2.Text = 2 * txtpanjang.Text * txtlebar.text
End Sub
Tidak ada komentar:
Posting Komentar
Berkomentarlah Jika Anda Tidak Mengerti,Berkomentarlah Dengan Sopan