Modul Vb Terbaru

download Modul Vb Terbaru

of 156

  • date post

    26-Dec-2015
  • Category

    Documents

  • view

    309
  • download

    0

Embed Size (px)

description

modul vb 6.0 free

Transcript of Modul Vb Terbaru

  • Bahasa Pemrograman (Visual Basic)

    SMK BIMA BOJONEGORO (c) 2011

    Suyanto, S.Kom

    Request modul belajar email to : letter.omen@gmail.com i

    NAMA : KELAS :

  • Bahasa Pemrograman (Visual Basic)

    SMK BIMA BOJONEGORO (c) 2011

    Suyanto, S.Kom

    Request modul belajar email to : letter.omen@gmail.com ii

    KATA PENGANTAR

    Mata pelajaran pemrograman (Visual Basic) di SMK BIMA BOJONEGORO

    diberikan untuk memperkenalkan Lingkungan Visual Basic, pembuatan interface

    dengan menggunakan tools yang ada serta mengimplementasikan program

    sederhana dengan bahasa Visual Basic. Disamping itu juga memahami struktur

    dan perintah-perintah program bahasa Visual Basic.

    Modul Bahasa Pemrograman (Visual Basic) ini terdiri dari 12 Bab sesuai dengan

    sistem pembelajaran yang ada di SMK BIMA BOJONEGORO untuk satu semester.

    Pada setiap pertemuan diberikan contoh-contoh program dan latihannya,

    diharapkan dengan mencoba contoh program yang ada dan mengerjakan

    latihannya, siswa lebih mudah untuk memahami materi yang diberikan.

    Penyusun berharap semoga modul ini bisa membantu siswa SMK BIMA

    BOJONEGORO dalam belajar, khususnya untuk pemrograman Visual Basic.

    Dalam kesempatan ini penyusun harapkan segala macam kritik yang bersifat

    membangun demi perbaikan modul ini di masa mendatang. Terima Kasih.

    Penyusun

  • Bahasa Pemrograman (Visual Basic)

    SMK BIMA BOJONEGORO (c) 2011

    Suyanto, S.Kom

    Request modul belajar email to : letter.omen@gmail.com iii

    DAFTAR ISI

    KATA PENGANTAR .................................................................................................. ii DAFTAR ISI ............................................................................................................... iii

    DAFTAR TABEL ..................................................................................................... viii

    DAFTAR GAMBAR .................................................................................................. ix

    BAB I PENDAHULUAN ............................................................................................ 1

    MATERI ...................................................................................................................... 1

    1.1 Perkembangan Bahasa Basic ............................................................................ 1

    1.2 Mengenal Visual Basic ...................................................................................... 2 A. Standard Edition ........................................................................................... 2

    B. Professional Edition ...................................................................................... 3

    C. Enterprise Edition ......................................................................................... 3

    1.3 Mengenal Integrated Development Environment (IDE) VB 6.0 ................... 4 A. Menjalankan IDE .......................................................................................... 4

    B. Memilih Tipe Project .................................................................................... 5

    1.4 Komponen IDE dalam VB 6.0 ......................................................................... 6 A. Project Window ............................................................................................ 6

    B. Form Designer .............................................................................................. 7

    C. Toolbox ......................................................................................................... 8

    D. Properties Window ....................................................................................... 8

    E. Code Window ............................................................................................... 8

    F. Module .......................................................................................................... 9

    G. Color Pallete Window ................................................................................... 9

    H. Form Layout Window ................................................................................... 9

    I. Immediate Window ....................................................................................... 9

    J. Object Browser ............................................................................................. 9

    K. Locals Window ............................................................................................. 9

    L. Watch Window ............................................................................................. 9

    M. Call Stack Window ....................................................................................... 9

    1.5 Menu, Toolbar dan ToolBox .......................................................................... 10 A. Menu ........................................................................................................... 10

    B. Toolbar ........................................................................................................ 11

    C. ToolBox ...................................................................................................... 12

    1.6 Menyimpan Project ........................................................................................ 14

    1.7 Menjalankan dan Menghentikan Program ................................................... 15

    SOAL LATIHAN ....................................................................................................... 15

    DAFTAR PUSTAKA ................................................................................................. 16

    BAB II TIPE DATA, VARIABEL dan KONSTANTA ............................................. 17

    OPERATOR dan KONTROL PROGRAM .............................................................. 17

    MATERI .................................................................................................................... 17

    2.1 Tipe Data dalam Visual Basic ......................................................................... 17

    2.2 Variabel dalam Visual Basic ........................................................................... 18 A. Deklarasi Variabel ...................................................................................... 19

  • Bahasa Pemrograman (Visual Basic)

    SMK BIMA BOJONEGORO (c) 2011

    Suyanto, S.Kom

    Request modul belajar email to : letter.omen@gmail.com iv

    B. Aturan Penamaan Variabel ......................................................................... 20

    C. Ruang Lingkup Variabel ............................................................................. 21

    2.3 Konstanta dalam Visual Basic ........................................................................ 22 A. Deklarasi Konstanta .................................................................................... 22

    B. Ruang Lingkup Konstanta .......................................................................... 23

    2.4 Operator .......................................................................................................... 23 A. Operator Penugasan (assignment) .............................................................. 23

    B. Operator Aritmatika .................................................................................... 23

    C. Operator Pembanding ................................................................................. 24

    D. Operator Logika .......................................................................................... 24

    2.5 Kontrol Program ............................................................................................. 25 A. Pencabangan On Error ................................................................................ 25

    B. Statement End ............................................................................................. 26

    C. Komentar Program ...................................................................................... 28

    2.6 Contoh Program.............................................................................................. 29

    SOAL LATIHAN ....................................................................................................... 32

    DAFTAR PUSTAKA ................................................................................................. 32

    BAB III PROPERTY, METHOD dan EVENT ......................................................... 33

    MATERI .................................................................................................................... 33

    3.1 Memahami Property, Method dan Event ...................................................... 34 A. Properti ........................................................................................................ 34

    B. Method ........................................................................................................ 34

    C. Event ........................................................................................................... 34

    3.2 Property ........................................................................................................... 35 A. Properti Name ............................................................................................. 36

    B. Properti Left, Top, Width, Height ............................................................... 37

    C. Properti ForeColor dan BackColor ............................................................. 38

    D. Prop