This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Showing posts with label kegunaan case pada vb. Show all posts
Showing posts with label kegunaan case pada vb. Show all posts

Thursday, May 9, 2013

kegunanaan case pada vb

silakan desain gambarnya dibawah













maka listing programnya sperti dibawah :
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Kodebarang.Items.Add("TS001")
        Kodebarang.Items.Add("TS002")
        Kodebarang.Items.Add("VG001")
        Kodebarang.Items.Add("VG002")
    End Sub

    Private Sub Kodebarang_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kodebarang.SelectedIndexChanged
        Dim X, x2 As String
        X = Microsoft.VisualBasic.Right(Kodebarang.Text, 3)
        Select Case X
            Case "001" : NamaBarang.Text = "FLASDHDISK 4GB"
            Case "002" : NamaBarang.Text = "FLASDHDISK 2GB"
            Case "001" : NamaBarang.Text = "FLASDHDISK 4GB"
            Case "002" : NamaBarang.Text = "FLASDHDISK 2GB"
        End Select
        X = Microsoft.VisualBasic.Left(Kodebarang.Text, 2)
        Select Case X
            Case "TS" : Merk.Text = "THOSIBA"
            Case "VG" : Merk.Text = "V_GEN"
            Case "TS" : Merk.Text = "THOSIBA"
            Case "VG" : Merk.Text = "V_GEN"
        End Select
        x2 = Microsoft.VisualBasic.Right(Kodebarang.Text, 3)
        If X = "TS" And x2 = "001" Then
            harga.Text = 10500
        ElseIf X = "TS" And x2 = "002" Then
            harga.Text = 75000
        ElseIf X = "VG" And x2 = "001" Then
            harga.Text = 90000
        ElseIf X = "VG" And x2 = "002" Then
            harga.Text = 60000
        End If

    End Sub


    Private Sub JmlhBeli_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles JmlhBeli.KeyPress
        Dim tombol As Integer = Asc(e.KeyChar)

        If tombol = 13 Then
            TtlHarga.Text = JmlhBeli.Text * harga.Text

        End If

    End Sub
End Class
luvne.com resepkuekeringku.com desainrumahnya.com yayasanbabysitterku.com