Mata Kuliah Semester 3
Pemrograman Visual I
§ CODING MEMBUAT SEBUAH §
§ PROGRAM/APLIKASI §
§ MENENTUKAN GANJIL/GENAP ANGKA §
§ DAN MENAMPILKAN KEMBALI INPUTAN §
بسم الله الرحمن الرحيم
Aplikasi ini menggunakan Visual Basic aja.
Dan berikut ini adalah rumus codingannya :
Selamat mencoba =)
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Public Sub tampil()
MessageBox.Show("Hello World", _
"Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub tampil(ByVal pesan As String)
MessageBox.Show(pesan, _
"Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub Sub1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
tampil(TextBox2.Text)
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Function kelamin() As String
Dim jk As String = ""
If RadioButton1.Checked = True Then
jk = "Laki-laki"
ElseIf RadioButton2.Checked = True Then
jk = "Perempuan"
End If
Return jk
End Function
Public Function cek(ByVal jumlah As Integer) As String
If (jumlah Mod 2 = 0) Then
Return "Bilangan Genap"
Else
Return "Bilangan Ganjil"
End If
End Function
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox(cek(TextBox1.Text))
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End Sub
End Class
Makasih udah mau mengunjungi blogku ..
Semoga berhasil dan ilmunya bisa bermanfaat lebih dan lebih lagi ..
^^
★☆。.:*:・"゚★('-^v)Thanks(v^-')★。.:*:・"☆★
0 komentar
Posting Komentar