Pertemuan 1


Pada form ini,menampilkan messagebox yang sederhana,caranya ketika tombol button di-klik,akan keluar message box.
koddingnya:

Public Class frmTampilan1

    Private Sub btntombol1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntombol1.Click
        MessageBox.Show("Nama saya Adri", "Halo", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub

    Private Sub btnok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnok.Click
        MessageBox.Show("Si Adri emang ganteng", "Fakta!", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub

    Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click
        MessageBox.Show("udah dibilangin adri ganteng", "Eh ngeyel!!", MessageBoxButtons.OK, MessageBoxIcon.Warning)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim x As Integer

        x = MessageBox.Show("Ingin tutup Aplikasi?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If (x = vbYes) Then
            End
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        frmTampilan2.Show()
    End Sub
End Class



1 komentar:

Anonim at: 6 Maret 2011 pukul 06.23 mengatakan...

Siapa adri???? Adri germo bandung ,,sarang homo

Posting Komentar