Minggu, 03 April 2011
BROSUR PENJUALAN NOTEBOOK DELL
berikut adalah tampilan form 1 dan form 2
form 1 :
.
form 2 :
form 1 ketika dijalankan :
form 2 ketika dijalankan :
berikut adalah koding form 1 :
Public Class Form1
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
PictureBox1.Visible = True
Else
PictureBox1.Visible = False
PictureBox5.Visible = False
End If
Label1.Text = "Rp 6.800.000"
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
PictureBox2.Visible = True
Else
PictureBox2.Visible = False
PictureBox5.Visible = False
End If
Label1.Text = "Rp 9.000.000"
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
If RadioButton3.Checked = True Then
PictureBox3.Visible = True
Else
PictureBox3.Visible = False
PictureBox5.Visible = False
End If
Label1.Text = "Rp 11.800.000"
End Sub
Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
If RadioButton4.Checked = True Then
PictureBox4.Visible = True
Else
PictureBox4.Visible = False
PictureBox5.Visible = False
End If
Label1.Text = "Rp 5.800.000"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
End Sub
End Class
berikut adalah kodingan form 2 :
Public Class Form2
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
TextBox1.Text = 6800000
TextBox2.Text = 6800000 * 0.1
End If
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
TextBox1.Text = 9000000
TextBox2.Text = 9000000 * 0.1
End If
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
If RadioButton3.Checked = True Then
TextBox1.Text = 11800000
TextBox2.Text = 11800000 * 0.1
End If
End Sub
Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
If RadioButton4.Checked = True Then
TextBox1.Text = 5800000
TextBox2.Text = 5800000 * 0.1
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
TextBox4.Text = 800000
Else : CheckBox1.Checked = False
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox5.Text = TextBox1.Text - TextBox2.Text + +TextBox3.Text + +TextBox4.Text
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
TextBox3.Text = 100000
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox1.Focus()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x As String
x = MsgBox(" Anda Yakin Keluar ? ", MsgBoxStyle.YesNo, "Konfirmasi")
If x = vbYes Then
End
End If
End Sub
End Class
Sabtu, 05 Maret 2011
[TUGAS] membuat program mengambil karakter tulisan
Penjelasan program :
RadioButton 2 = Untuk memilih karakter dari sebelah tengah kalimat
RadioButton 3 = Untuk memilih karakter dari sebelah kanan kalimat
Posisi Awal = Posisi karakter yg diinginkan di awal
Posisi Akhir = Posisi karakter yg diinginkan di akhir
Banyak Karakter = Banyaknya karakter yg diinginkan dari kalimat yg di inginkan
Button Proses = Untuk memproses program ini
Button Keluar = Untuk keluar dari program ini
Hasil = Akan tampil suatu hasil dari pemilihan kata yg ada di atas
SCREENSHOOT :
Tampilan Form 1 sebelum didebug :
Saat di debug di ms. Visual Basic :
Tampilan screen shot kodingnya :
Tampilan koding form 1 :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If rb_kiri.Checked = True Then
txt_awal.Text = "1"
txt_akhir.Text = txt_karakter.Text
txt_hasil.Text = Microsoft.VisualBasic.Left(txt_teks.Text, Val(txt_karakter.Text))
End If
If rb_tengah.Checked = True Then
txt_hasil.Text = Microsoft.VisualBasic.Mid(txt_teks.Text, Val(txt_karakter.Text), Val(txt_akhir.Text))
End If
If rb_kanan.Checked = True Then
txt_awal.Text = Len(txt_teks.Text) - Val(txt_karakter.Text) + 1
txt_akhir.Text = Len(txt_teks.Text)
txt_hasil.Text = Microsoft.VisualBasic.Right(txt_teks.Text, Val(txt_karakter.Text))
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class