BISMILLAH

بِــــــسْÙ…ِ اللهِ الرَّØ­ْÙ…َÙ†ِ الرَّØ­ِيـــمِ

SELAMAT DATANG DI STIKOM MUHAMMADIYAH BATAM

SELAMAT DATANG DI KAMPUS S.M.B. (STIKOM MUHAMMADIYAH BATAM) - RAIH MASA DEPANMU BERSAMA KAMPUS S.M.B. - TERDEPAN - MODEREN - DAN - ISLAMI, - BLOG INI MASIH BANYAK KEKURANGAN, HARAP MAKLUM - DAN TERIMAKASIH ATAS KUNJUNGAN ANDA

BERSYUKUR

BERSYUKURLAH

MAKA ANDA AKAN BAHAGIA

Menu

.

Radio Online Minang Cimbuak                Radio Online Minang Cimbuak

Selasa, 09 Juni 2015

PROGRAM PERULANGAN ( LOOPING )



VB STUDIO 2010

 

BERIKUT CODINGNYA


Public Class Form3
FOR NEX
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer
        ListBox1.Items.Clear()
        For i = TextBox1.Text to TextBox2.Text Step TextBox3.Text
            ListBox1.Items.Add(i)
        Next
    End Sub

DO WHILE

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim I As Integer
        ListBox1.Items.Clear()
        I = TextBox1.Text
        While I <= TextBox2.Text
            ListBox1.Items.Add(i)
            I += TextBox3.Text
        End While
    End Sub


DO UNTIL
  
 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim i As Integer
        ListBox1.Items.Clear()
        i = TextBox1.Text
        Do Until i > TextBox2.Text
            ListBox1.Items.Add(i)
            i += TextBox3.Text
        Loop
    End Sub



WHILE
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim i As Integer
        ListBox1.Items.Clear()
        i = TextBox1.Text
        While i < TextBox2.Text
            ListBox1.Items.Add(i)
            i += TextBox3.Text
        End While
    End Sub


CLEAR

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        TextBox1.Text.Clear()
        TextBox2.Text.Clear()
        TextBox3.Text.Clear()
        Lbhasil. Items.Clear()
    End Sub
End Class


EXIT

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim x As Integer
        x = MsgBox("Anda Yakin Ingin Keluar", MsgBoxStyle.OkCancel + MsgBoxStyle.Question, "ANDA YAKIN")
        If x = vbOK Then
            End
        End If
    End Sub
End Class

BY = ZARMI

Tidak ada komentar:

Posting Komentar