1 / 34

Dasar Pemrograman 1 Pemrograman Visual Basic 6.0

Dasar Pemrograman 1 Pemrograman Visual Basic 6.0. Iwan santosa, ST. What is Visual Basic?. Visual Basic is a tool that allows you to develop Windows (Graphic User Interface - GUI ) applications. The applications have a familiar appearance to the user.

masato
Download Presentation

Dasar Pemrograman 1 Pemrograman Visual Basic 6.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dasar Pemrograman 1Pemrograman Visual Basic 6.0 Iwan santosa, ST

  2. What is Visual Basic? • Visual Basic is a tool that allows you to develop Windows (Graphic User Interface - GUI) applications. The applications have a familiar appearance to the user. • Visual Basic is event-driven, meaning code remains idle until called upon to respond to some event (button pressing, menu selection, ...).

  3. Application (Project) • Forms - Windows that you create for user interface • Controls - Graphical features drawn on forms to allow user interaction (text boxes, labels, scroll bars, command buttons, etc.) (Forms and Controls are objects.) • Properties - Every characteristic of a form or control is specified by a property. Example properties include names, captions, size, color, position, and contents. Visual Basic applies default properties. You can change properties at design time or run time. • Methods - Built-in procedure that can be invoked to impart some action to a particular object. • Event Procedures - Code related to some object. This is the code that is executed when a certain event occurs. • General Procedures - Code not related to objects. This code must be invoked by the application. • Modules - Collection of general procedures, variable declarations, and constant definitions used by application.

  4. Kontrol Menu • Restore • Move • Size • Minimize • Maximize • Close

  5. Lingkungan • Floating • Sizeable • Dockable

  6. Menu • Dengan Mouse • Dengan Keyboard

  7. Main Window

  8. Toolbox

  9. Project Explorer

  10. Windows Properties

  11. Form Layout Windows

  12. Jendela Kode

  13. Membuka Aplikasi Baru

  14. Keterangan Singkat • Standart EXE • Membuat aplkasi visual basic standart (umum) • ActiveX EXE • Membuat aplikasi activeX • ActiveX DLL • Membuat Library ActiveX • activeX Control • Membuat kontrol activeX • VB Application Wizard • Membuat aplikasi VB dengan bantuan wizard • VB Wizard Manager • IPusat Pengelolaan Wizard Visual Basic • IIS Aplication • Membuat aplikasi IIS (Internet Information Server) • DHTML Application • Membuat aplikasi DHTML

  15. Membuka Aplikasi Yang Sudah ada

  16. USER EVENT SYSTEM PROSES METODE HASIL Alur Program VB

  17. APLIKASI VB KODE FORM KODE KONTROL KODE KONTROL KODE MODUL Bagian Kode

  18. Structure of a Visual Basic Application

  19. Penggunaan jendela Kode • Arti Warna text Pada Umumnya • Biru • Text ini merupakan kata kunci (reserved word) • Hijau • Text ini merupakan keterangan • Hitam • Tulisan biasa (kode, nama variabel dan yang lainnya) • Merah • Kode program yang salah

  20. Bantuan Pada jendela kode • Tool Tips • Otomasi variabel • Jendela Attribut

  21. Data, Variabel dan Konstanta 2 1 1 + 2 3

  22. Type Data • Integer • Type data berupa bilangan bulat (-32.768 – 32.767) • Byte • Decimal • String • Single • Double • Date • Currency • Long • Object • Varinant

  23. Variabel • Merupakan tempat penyimpanan sementara VARIABEL

  24. Proses Pergantian Nilai Variabel Si Usrok USER Si Usrok Si Unyil Si Usrok Si Unyil METODE

  25. Deklarasi Variabel • Variabel dideklarasikan dengan Dim • Sintaksnya • Dim namavariabel As Type Data • Contoh • Dim Nama As String • Dim No As Integer • Dim TglLahir As Date

  26. Variabel Global dan Local • Variabel Global : variabel yang dapat diakses dari semua lokasi di dalam program. • Contoh • PUBLIC Counter As Integer (Pendeklarasian di Jendela modul kode) • Variabel Lokal : variabel yang hanya dapat digunakan di lingkungannya sendiri. • Contoh • Pendeklarasian variabel di dalam event

  27. Pemberian Nama Variabel • Nama diberikan untuk memperjelas kegunaan variabel tersebut

  28. Aturan Suffix • Dim No As Integer • Bisa dipersingkat • Dim No%

  29. Konstanta • Media Penympanan nilai yang bersifat tetap • Contoh : • TotalBiaya = 0,5*Produksi + Ovr • Dimana Ovr = 500000 • Ovr = KONSTANTA • Cara Penuliasan konstanta • Const namakonstanta As Tipe = Nilai

  30. Operator • Macam-macam Operator • Operator Aritmetik • Operator Perbandingan • Operator Logika

  31. Operator Aritmatika • Operator yang dilakukan untuk melakukan perhitungan mamtematis.

  32. Tingkat Urutan • Pangkat • Perkalian dan Pembagian • Penjumlahan dan pengurangan • Contoh • Total = 2*5+3^2 • =2*5+9 • =10+9 • =19

  33. Operator Perbandingan • Contoh • Jumlah >=10

  34. Operator Logika

More Related