TUGAS VISUAL BASIC



Dibawah ini adalah script dan printscreen dari form latihan pertama dari mata kuliah pemograman visual :


  
//**FORM1
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer. 
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.Label1 = New System.Windows.Forms.Label
        Me.ComboBox1 = New System.Windows.Forms.ComboBox
        Me.Button1 = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(36, 82)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(110, 13)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "Pilih Bulan Lahir Anda"
        '
        'ComboBox1
        '
        Me.ComboBox1.FormattingEnabled = True
        Me.ComboBox1.Items.AddRange(New Object() {"Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"})
        Me.ComboBox1.Location = New System.Drawing.Point(39, 99)
        Me.ComboBox1.Name = "ComboBox1"
        Me.ComboBox1.Size = New System.Drawing.Size(121, 21)
        Me.ComboBox1.TabIndex = 1
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(39, 127)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(121, 23)
        Me.Button1.TabIndex = 2
        Me.Button1.Text = "Lihat Karakter Saya"
        Me.Button1.UseVisualStyleBackColor = True
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(292, 266)
        Me.Controls.Add(Me.Button1)
        Me.Controls.Add(Me.ComboBox1)
        Me.Controls.Add(Me.Label1)
        Me.Name = "Form1"
        Me.Text = "kakak ade"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
    Friend WithEvents Button1 As System.Windows.Forms.Button
End Class.
///////////////\\\\\\\\\\\\\\\\\\\\\\

Dan  Dibawah ini adalah script dan printscreen dari form latihan kedua dari mata kuliah pemograman visual :
//FORM2

Public Class Form2

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub btndaftar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndaftar.Click
        If rdlaki.Checked Then
            MsgBox("Nama: " & txtnama.Text & vbCrLf & _
            "Tempat, Tgl Lahir: " & txttgl.Text & vbCrLf & _
            "Jenis Kelamin: " & rdlaki.Text & vbCrLf & _
            "Hobi: " & cbbaca.Text & "," & cbraga.Text & "," & cbmusic.Text & "," & cbtravel.Text & vbCrLf & _
            "Agama: " & cbagama.Text & vbCrLf & _
            "Alamat: " & txtalamat.Text & vbCrLf & MsgBoxStyle.Information, "HASIL")
        Else
            MsgBox("Nama: " & txtnama.Text & vbCrLf & _
            "Tempat, Tgl Lahir: " & txttgl.Text & vbCrLf & _
            "Jenis Kelamin: " & rdpr.Text & vbCrLf & _
            "Hobi: " & cbbaca.Text & "," & cbraga.Text & "," & cbmusic.Text & "," & cbtravel.Text & vbCrLf & _
            "Agama: " & cbagama.Text & vbCrLf & _
            "Alamat: " & txtalamat.Text & vbCrLf & MsgBoxStyle.Information, "HASIL")
        End If
    End Sub

    Private Sub Bbtnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bbtnexit.Click
        Dim hasil = MessageBox.Show("Yakin akan keluar dari aplikasi ini ?", "EXIT", MessageBoxButtons.YesNo)
        If hasil = DialogResult.Yes Then
            Application.Exit()
        End If
    End Sub
End Class



Felix Hutapea 
411210005