LAMPIRAN 1
LIST PROGRAM
Form1. Halaman Utama
Public Class Form1
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Registrasi.Show() Me.Hide()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
koneksiKeDatabase() End Sub
Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
Form6.Show() Me.Hide() End Sub
Private Sub PictureBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox4.Click
Form7.Show() Me.Hide() End Sub
End Class
Form2. Register
Public Class Registrasi
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Data Harus Diisi!!!", vbCritical,
"Peringatan")
ElseIf TextBox2.Text = "" Then
MsgBox("Data Harus Diisi!!!", vbCritical,
"Peringatan")
ElseIf TextBox3.Text = "" Then
MsgBox("Data Harus Diisi!!!", vbCritical,
"Peringatan")
Form2.Show() Me.Hide()
End If
End Sub
Private Sub Registrasi_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub PictureBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox4.Click
Form7.Show() Me.Hide()
End Sub
Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
Form6.Show() Me.Hide() End Sub
End Class
Form 3. Soal
Public Class Form2
Public Hasil1 As Long
Public TextHasil1 As String
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form1.Show() Me.Hide()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nil1 As Long, nil2 As Long, nil3 As Long, nil4 As Long, nil5 As Long
If RadioButton2.Checked = True Then nil1 = -1
If RadioButton1.Checked = True Then nil1 = 1
If RadioButton3.Checked = True Then nil2 = 1
If RadioButton4.Checked = True Then nil2 = -1
End If
If RadioButton6.Checked = True Then nil3 = 1
If RadioButton5.Checked = True Then nil3 = -1
End If
If RadioButton7.Checked = True Then nil4 = 1
If RadioButton8.Checked = True Then nil4 = -1
End If
If RadioButton10.Checked = True Then nil5 = 1
If RadioButton9.Checked = True Then nil5 = -1
End If
If RadioButton3.Checked = False And RadioButton4.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton5.Checked = False And RadioButton6.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton7.Checked = False And RadioButton8.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton9.Checked = False And RadioButton10.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If (RadioButton1.Checked = True Or RadioButton2.Checked = True) And (RadioButton3.Checked = True Or RadioButt on4.Checked = True) And (RadioButton5.Checked = True Or RadioButton6.Checked = True) And (RadioButton7.Checked = True Or RadioButton8.Checked = True) And (RadioButton9.Checked = True Or RadioButton10.Checked = True) Then
Dim Hasil1 As Long, i As Long, ex As Long
If Hasil1 >= 3 Then
MsgBox("Anda mendapatkan hasil Introvert",
vbInformation, "Introvert vs Extrovert") TextHasil1 = "i"
ElseIf Hasil1 <= 3 Then
MsgBox("Anda mendapatkan hasil Extrovert",
vbInformation, "Introvert vs Extrovert") TextHasil1 = "e"
End If
Form3.Show() Me.Hide()
End If
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class
Form 4. Soal2
Public Class Form3
Public Hasil2 As Long
Public TextHasil2 As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nil1 As Long, nil2 As Long, nil3 As Long, nil4 As Long, nil5 As Long
If RadioButton12.Checked = True Then nil1 = 1
If RadioButton11.Checked = True Then nil1 = -1
End If
If RadioButton3.Checked = True Then nil2 = 1
If RadioButton4.Checked = True Then nil2 = -1
End If
If RadioButton6.Checked = True Then nil3 = -1
If RadioButton5.Checked = True Then nil3 = 1
End If
nil5 = 1
If RadioButton9.Checked = True Then nil5 = -1
End If
If RadioButton3.Checked = False And RadioButton4.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton5.Checked = False And RadioButton6.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton12.Checked = False And RadioButton11.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton9.Checked = False And RadioButton1 0.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If (RadioButton1.Checked = True Or RadioButton2.Checked = True) And (RadioButton3.Checked = True Or RadioButton4.Checked = True) And (RadioButton5.Checked = True Or RadioButton6.Checked = True) And (RadioButton7.Checked = True Or RadioButton8.Checked = True) And (RadioButton9.Checked = True Or RadioButton10.Checked = True) Then
End If
Dim Hasil2 As Long, s As Long, n As Long
Hasil2 = Val(nil1) + nil2 + nil3 + nil4 + nil5
If Hasil2 >= 3 Then
MsgBox("Anda mendapatkan hasil Sensing",
vbInformation, "Sensingt vs Intuition") TextHasil2 = "s"
ElseIf Hasil2 <= 3 Then
MsgBox("Anda mendapatkan hasil Intuition",
vbInformation, "Sensingt vs Intuition") TextHasil2 = "n"
End If
Form4.Show() Me.Hide()
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show() Me.Hide()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form1.Show() Me.Hide()
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.Click
End Sub End Class
Form 5. Soal3
Public Class Form4
Public Hasil3 As Long
Public TextHasil3 As String
Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form1.Show() Me.Hide()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nil1 As Long, nil2 As Long, nil3 As Long, nil4 As Long, nil5 As Long
If RadioButton2.Checked = True Then nil1 = 1
If RadioButton1.Checked = True Then nil1 = -1
End If
If RadioButton3.Checked = True Then nil2 = -1
End If
If RadioButton6.Checked = True Then nil3 = 1
If RadioButton5.Checked = True Then nil3 = -1
End If
If RadioButton7.Checked = True Then nil4 = -1
If RadioButton8.Checked = True Then nil4 = 1
End If
If RadioButton10.Checked = True Then nil5 = 1
If RadioButton9.Checked = True Then nil5 = -1 End If
If RadioButton1.Checked = False And RadioButton2.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton3.Checked = False And RadioButton4.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton5.Checked = False And RadioButton6.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton7.Checked = False And RadioButton8.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton9.Checked = False And RadioButton10.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
Dim Hasil3 As Long, t As Long, f As Long
Hasil3 = Val(nil1) + nil2 + nil3 + nil4 + nil5
If Hasil3 >= 3 Then
MsgBox("Anda mendapatkan hasil Thinking",
vbInformation, "Thinking vs Feeling") TextHasil3 = "t"
MsgBox("Anda mendapatkan hasil Thinking", vbInformation, "Thinking vs Feeling")
TextHasil3 = "f" End If
Form5.Show() Me.Hide() End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form3.Show() Me.Hide() End Sub
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class
Form 6. Soal4
Public Class Form5
Public Hasil3 As Long Public Hasil2 As Long Public Hasil1 As Long
Public TextHasil4 As String Public TextHasil5 As String
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form1.Show() Me.Hide()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nil1 As Long, nil2 As Long, nil3 As Long, nil4 As Long, nil5 As Long
If RadioButton12.Checked = True Then nil1 = -1
If RadioButton11.Checked = True Then nil1 = 1
End If
If RadioButton3.Checked = True Then nil2 = 1
If RadioButton4.Checked = True Then nil2 = -1
End If
nil3 = 1
If RadioButton5.Checked = True Then nil3 = -1
End If
If RadioButton7.Checked = True Then nil4 = -1
If RadioButton8.Checked = True Then nil4 = 1
End If
If RadioButton10.Checked = True Then nil5 = 1
If RadioButton9.Checked = True Then nil5 = -1 End If
If RadioButton11.Checked = False And
RadioButton12.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton3.Checked = False And RadioButton4.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton5.Checked = False And RadioButton6.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton7.Checked = False And RadioButton8.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
If RadioButton9.Checked = False And RadioButton10.Checked = False Then
MsgBox("Oops!! ada yang belum dipilih", vbInformation, "Warning")
End If
Dim Hasil4 As Long, j As Long, p As Long
Hasil4 = Val(nil1) + nil2 + nil3 + nil4 + nil5
If Hasil4 >= 3 Then
MsgBox("Anda mendapatkan hasil Judging",
vbInformation, "Judging vs Percieving") TextHasil4 = "p"
ElseIf Hasil3 <= 3 Then
MsgBox("Anda mendapatkan hasil Percieving",
vbInformation, "Judging vs Percieving") TextHasil4 = "j"
Me.Hide()
MsgBox("Terima kasih anda te lah menjawab soal tes, tekan OK untuk melihat hasil tes!", vbInformation, "MBTI")
TextHasil5 = Form2.TextHasil1 + Form3.TextHasil2 +
Form4.TextHasil3 + Me.TextHasil4
If TextHasil5 = "enfj" Then
ENFJ.Show()
ElseIf TextHasil5 = "enfp" Then
ENFP.Show()
ElseIf TextHasil5 = "entj" Then
ENTJ.Show()
ElseIf TextHasil5 = "entp" Then
ENTP.Show()
ElseIf TextHasil5 = "esfj" Then
ESFJ.Show()
ElseIf TextHasil5 = "esfp" Then
ESFP.Show()
ElseIf TextHasil5 = "estj" Then
ESTJ.Show()
ElseIf TextHasil5 = "estp" Then
ESTP.Show()
ElseIf TextHasil5 = "infj" Then
INFJ.Show()
ElseIf TextHasil5 = "infp" Then
INFP.Show()
ElseIf TextHasil5 = "intj" Then
INTJ.Show()
ElseIf TextHasil5 = "intp" Then
INTP.Show()
ElseIf TextHasil5 = "isfj" Then
ElseIf TextHasil5 = "isfp" Then
ISFP.Show()
ElseIf TextHasil5 = "istj" Then
ISTJ.Show()
ElseIf TextHasil5 = "istp" Then
ISTP.Show()
End If
Dim Result As Long
Hasil3 = Form4.Hasil3 Hasil2 = Form3.Hasil2 Hasil1 = Form2.Hasil1
Result = Val(Hasil1) + Hasil2 + Hasil3 + Hasil4
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form4.Show() Me.Hide() End Sub
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class
Form 7. 16 Kepribadian MBTI
Public Class Form6
Private Sub PictureBox6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox6.Click
ISFJ.Show() Me.Hide() End Sub
Private Sub PictureBox18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox18.Click
Form1.Show() Me.Hide()
Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
ENFJ.Show() Me.Hide() End Sub
Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
ENFP.Show() Me.Hide() End Sub
Private Sub PictureBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox4.Click
ENTJ.Show() Me.Hide() End Sub
Private Sub PictureBox5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox5.Click
ENTP.Show() Me.Hide() End Sub
Private Sub PictureBox11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox11.Click
ENFJ.Show() Me.Hide() End Sub
Private Sub PictureBox10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox10.Click
ESFP.Show() Me.Hide() End Sub
Private Sub PictureBox9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox9.Click
ESTJ.Show() Me.Hide() End Sub
Private Sub PictureBox8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox8.Click
ESTP.Show() Me.Hide() End Sub
Private Sub PictureBox16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox16.Click
INFJ.Show() Me.Hide() End Sub
Private Sub PictureBox15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox15.Click
Private Sub PictureBox14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox14.Click
INTJ.Show() Me.Hide() End Sub
Private Sub PictureBox13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox13.Click
INTP.Show() Me.Hide() End Sub
Private Sub PictureBox12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox12.Click
ISFP.Show() Me.Hide() End Sub
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click
ISTJ.Show() Me.Hide() End Sub
Private Sub PictureBox17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox17.Click
ISTJ.Show() Me.Hide() End Sub
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class
Form 8. Tentang MBTI
Public Class Form7
Private Sub PictureBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox4.Click
Me.Show() Me.Hide() End Sub
Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
Form6.Show() Me.Hide()
End Sub
Private Sub PictureBox18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox18.Click
End Sub
Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class
Form 9. Module
Module Module1
Dim koneksi As OleDb.OleDbConnection
'Fungsi untuk membuat koneksi dari Visual Basic ke Database Access
Public Sub koneksiKeDatabase()
'Membuat String koneksi
koneksi = New
OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data
Source=Database511.accdb")
'Membuka koneksi ke Database koneksi.Open()
End Sub
'Fungsi untuk memutuskan koneksi dari Visual Basic ke Database Access
Public Sub diskonekDariDatabase()
'Memutuskan koneksi ke Database koneksi = Nothing
End Sub
'Fungsi untuk menambahkan data pegawai ke database Public Sub tambahData()
'Mendeklarasikan SQL Query
Dim q As String = "INSERT INTO [daftar]([nama],
[username], [password]) VALUES " &
"('" & Registrasi.TextBox1.Text & "',' " & Registrasi.TextBox2.Text & "'," &
"'" & Registrasi.TextBox3.Text & "')"
'Jalankan SQL Query
Dim cmd As New OleDb.OleDbCommand(q, koneksi) cmd.ExecuteNonQuery()