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 is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

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 is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Sunday, November 15, 2015

Membuat Laman Baru pada Blogger

Membuat Laman Baru (tab menu) pada Blogger
contohnya seperti ini:
Oke, dilarang mencela... haha
Ya mungkin ini mudah bagi sebagian orang, tetapi bagi yang baru saja mencoba, bagi newbie2 di luar sana, hal ini cukup merepotkan juga. Saya pun dulu bingung bagaimana cara menambahkan menu seperti contoh di atas. Sebenarnya banyak cara untuk membuat tab menu tersebut. Saya hanya akan berbagi satu cara yang saya pakai, berikut langkah-langkahnya:
1.      Masuk ke Blog masing-masing (tentu saja). Muncul main page awal, tetapi belum ada tab menu seperti pada contoh
2.      klik desain pada bagian kanan atas blog,
3.      pilih laman---> laman baru ---> alamat web
4.      Akan muncul kotak diaolg yang isinya Judul laman dan alamat web
untuk judul laman isikan sesuai keinginan, misal halaman ini nantinya khusus untuk download, maka isikan dengan nama download atau nama lain yang berhubungan (terserah Anda). Judul laman ini yang nantinya akan muncul seperti tab menu pada contoh. untuk alamat web isikan
ini maksutnya, postingan kamu yang nantinya diberi "label" download, postingan tersebut otomatis akan masuk ke laman download. Jadi, postingan kita akan ter-cluster sendiri, mudah bukan.
5.      The last, jangan lupa simpan setting-an/setelan.

semoga bermanfaat. :D sekali lagi dilarang mencela. Jika Anda merasa memiliki ilmu lebih, bersedialah berbagi dengan saya.

Cara Membuat Kalkulator dengan VB.net


Kali ini saya akan memposting tentang membuat kalkulator dengan VB.net / Visual Studio 2010.
Langkah - langkah membuat Calculator dengan VB.net :

1. Buka Microsoft Visual Studio 2010

2. Pilih New Project->Windows Form Application


3. Buat 20 buah Button dan 1 buah Textbox pada Form


4. Edit Text property pada tiap Button sehingga tampilan seperti gambar dibawah.



 5. Double klik pada form lalu masukkan kode berikut :

   Public Class Form1

             Dim operand1 As Double
        Dim [operator] As String
        Dim baru As Boolean = True
        Dim temp As Double
        Dim operand2 As Double


6. Double klik pada button 0 ketikkan kode

   Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click, Button11.Click, Button12.Click, Button6.Click, Button7.Click, Button8.Click, Button1.Click, Button2.Click, Button3.Click, Button10.Click

        TextBox1.Text = TextBox1.Text & sender.text

    End Sub


7. Masukkan kode berikut pada button Tambah

   Private Sub Buttom9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

        If baru() = True Then
            operand1 = Val(TextBox1.Text)
            TextBox1.Text = ""
            TextBox1.Focus()
            [operator] = "+"
        ElseIf baru() = False Then
            If [operator] = "+" Then
                temp = operand1 + Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "+"
            ElseIf [operator] = "-" Then
                temp = operand1 - Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "+"
            ElseIf [operator] = "x" Then
                temp = operand1 * Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "+"
            ElseIf [operator] = ":" Then
                temp = operand1 / Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "+"
            End If

        End If

        baru = False

    End Sub

8. Masukkan Kode Berikut Pada Button Kurang

Private Sub Buttom14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click

        If baru() = True Then
            operand1 = Val(TextBox1.Text)
            TextBox1.Text = ""
            TextBox1.Focus()
            [operator] = "-"
        ElseIf baru() = False Then
            If [operator] = "+" Then
                temp = operand1 + Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "-"
            ElseIf [operator] = "-" Then
                temp = operand1 - Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "-"
            ElseIf [operator] = "x" Then
                temp = operand1 * Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "-"
            ElseIf [operator] = ":" Then
                temp = operand1 / Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "-"
            End If

        End If

        baru = False

    End Sub

9. Kode Berikut pada button Kali

   Private Sub Buttom19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click

        If baru() = True Then
            operand1 = Val(TextBox1.Text)
            TextBox1.Text = ""
            TextBox1.Focus()
            [operator] = "x"
        ElseIf baru() = False Then

            If [operator] = "+" Then
                temp = operand1 + Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "x"
            ElseIf [operator] = "-" Then
                temp = operand1 - Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "x"
            ElseIf [operator] = ";" Then
                temp = operand1 / Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "x"
            ElseIf [operator] = "x" Then
                temp = operand1 * Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = "x"
            End If

        End If

        baru = False

    End Sub

10. Kode Berikut Pada button Bagi

     Private Sub Buttom4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        If baru() = True Then
            operand1 = Val(TextBox1.Text)
            TextBox1.Text = ""
            TextBox1.Focus()
            [operator] = ":"
        ElseIf baru() = False Then
            If [operator] = "+" Then
                temp = operand1 + Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = ":"
            ElseIf [operator] = "-" Then
                temp = operand1 - Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = ":"
            ElseIf [operator] = "x" Then
                temp = operand1 * Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = ":"
            ElseIf [operator] = ":" Then
                temp = operand1 / Val(TextBox1.Text)
                operand1 = temp()
                TextBox1.Text = ""
                [operator] = ":"
            End If

        End If

        baru = False

    End Sub

11. Kode berikut pada button hasil

     Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
        Dim hasil As Double
        operand2 = Val(TextBox1.Text)

        Select Case [operator]

            Case "+"
                hasil = operand1 + operand2
                TextBox1.Text = hasil.ToString
                baru = True
            Case "-"
                hasil = operand1 - operand2
                TextBox1.Text = hasil.ToString
            Case ":"
                hasil = operand1 / operand2
                TextBox1.Text = hasil.ToString
            Case "x"
                hasil = operand1 * operand2
                TextBox1.Text = hasil.ToString
                baru = True
        End Select

        TextBox1.Text = hasil.ToString

    End Sub


12. Kode berikut pada button titik

Private Sub Buttom17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

        If InStr(TextBox1.Text, ".") > 0 Then
            Exit Sub
        Else
            TextBox1.Text = TextBox1.Text & "."
        End If

    End Sub


13. Kode berikut pada button Clear
        Private Sub Buttom5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

        TextBox1.Text = ""
        operand1 = 0
        temp = 0
        baru = True

    End Sub

14.  Pada button Pangkat
          Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click

        If TextBox1.Text = "" Or TextBox1.Text = "" Then
            MsgBox("Maaf, nilai belum diinput")
        Else
            TextBox1.Text = Val(TextBox1.Text) * Val(TextBox1.Text)
        End If

    End Sub

15. Terakhir kode pada button Decimal
Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        Dim convert As Single
        If TextBox1.Text <> 0 Then
            convert = 1 / Val(TextBox1.Text)
            TextBox1.Text = convert
        End If
    End Sub

Contoh gambar Coding :

14. Click Start Debugging dan lihat hasilnya