Visual Basic 6




 Form
                     Background
                       Icon
Toolbox    Control
                                   Form

Toolbar

Project                  Form
Explorer   Form           1 Form
Window
 Properties                              Project
  Window
Form Layout                 Form
  Window                           Run

            (Toolbar)
                               Visual
 Basic




                        4
 1. Standard
 Toolbars
         Project
 2. Edit Toolbars


         code editor
 3. Debug
 Toolbars


 4. Form Editor
Toolbars
             ,   ,




      Add
      Standard                Project
      EXE        Program
      Project
      Add                     Form               Project
      Form                                Form
                        Menu Editor
      Menu
                                           Menu
      Editor
                 Form
                               Project
      Open

      Save                      Project
                             Object                Form
      Cut

      Copy                 Copy Object     Form
                           Paste Object             Cut
      Paste
                     Copy
Editor
Find                                          Form
           Editor
Undo                                    Editor
Typing     Form Editor
Redo
                                      Editor
Typing
                      Run Project
Start


Break                               Project
End                                     Run Project

Project
           Project                   Form
Explorer
           Module
Project                                    Project
Window         Form
Form
                                Form Layout
Layout
                                    Form
window
Object                          Object Browser
Browser              Class
                 Class
     Tool Box                Tool Box

                                      x    y   Form
          Form
                                    Form         x
     Form           y




Toolbox                  Controls
2
1.                  Intrinsic
controls)                                 Visual Basic
                    Form




            Class
 Contr
     ol
Chec CheckBox                                         True/False,
k box               Yes/No)
Comb ComboBo               control                          Text
o box x             box     List box


                          Combo box


Com Comman                           control
mand dButton                                   Click event
button              procedure           control



Data Data                  control
Visual Basic
                                                  control
                                        table
                        Data               Database Jet


                    ActiveX Data Object (ADO)
Direct DirListBox       List box
ory
List
box
Drive DriveListB              Combo box
List   ox
box
File   FileListBo       List box
list   x
box
Fram Frame                         container
e                   control
Horiz HScrollBa                          stand-alone
ontal r                                            control
       VScrollBa
Vertic r
al
Scroll
Bar
Image Image              control
                   Picture box
                   container      Image


                   Picture box
Label Label              control


Line     Line            control


List     ListBox         control
box

                                          MultiSelect
OLE OLE                  control            Host
contai             window
ner                Microsoft Excel
                                              window


                   Visual Basic
Optio OptionBut            control                  control
n        ton                                   control
button                                                   control
                                     control



Pictur PictureBo                                BMP, DIB
e box x             (bitmap),           ico), WMF (metafile),
                    GIF     JPEG
Shap Shape                 control
e
Text TextBox               control
box

Timer Timer                control




2.             ActiveX (ActiveX
controls)
Project/Components




  Form Designer




                       Visual Basic
             Project   1
Project Explorer
Project Explorer


                    (tree-
view)



2
Project Explorer




                                         vbp
Project (n)
                                1
Form (n) .frm
                      1

Modules
                                      .bas
Class
Modules                         cls

                      ActiveX
User controls
                          ctl

Designers
                dsr

 Properties Window
(adtive)      focus)




                      2
1.   Alphabetic


2.   Categorized



       Form Layout




                     drag
Immediate Window




           New Project
          New Project    File/New
Project
                           Visual
Basic
Code Editor

ส่วนประกอบของโปรแกรม Visual basic 6

  • 1.
    Visual Basic 6 Form Background Icon Toolbox Control Form Toolbar Project Form Explorer Form 1 Form
  • 2.
    Window Properties Project Window Form Layout Form Window Run (Toolbar) Visual Basic 4 1. Standard Toolbars Project 2. Edit Toolbars code editor 3. Debug Toolbars 4. Form Editor
  • 3.
    Toolbars , , Add Standard Project EXE Program Project Add Form Project Form Form Menu Editor Menu Menu Editor Form Project Open Save Project Object Form Cut Copy Copy Object Form Paste Object Cut Paste Copy
  • 4.
    Editor Find Form Editor Undo Editor Typing Form Editor Redo Editor Typing Run Project Start Break Project End Run Project Project Project Form Explorer Module Project Project Window Form Form Form Layout Layout Form window Object Object Browser
  • 5.
    Browser Class Class Tool Box Tool Box x y Form Form Form x Form y Toolbox Controls
  • 6.
    2 1. Intrinsic controls) Visual Basic Form Class Contr ol Chec CheckBox True/False, k box Yes/No) Comb ComboBo control Text o box x box List box Combo box Com Comman control mand dButton Click event button procedure control Data Data control
  • 7.
    Visual Basic control table Data Database Jet ActiveX Data Object (ADO) Direct DirListBox List box ory List box Drive DriveListB Combo box List ox box File FileListBo List box list x box Fram Frame container e control Horiz HScrollBa stand-alone ontal r control VScrollBa
  • 8.
    Vertic r al Scroll Bar Image Image control Picture box container Image Picture box Label Label control Line Line control List ListBox control box MultiSelect OLE OLE control Host contai window ner Microsoft Excel window Visual Basic
  • 9.
    Optio OptionBut control control n ton control button control control Pictur PictureBo BMP, DIB e box x (bitmap), ico), WMF (metafile), GIF JPEG Shap Shape control e Text TextBox control box Timer Timer control 2. ActiveX (ActiveX controls)
  • 10.
    Project/Components FormDesigner Visual Basic Project 1
  • 11.
  • 12.
    Project Explorer vbp Project (n) 1 Form (n) .frm 1 Modules .bas Class Modules cls ActiveX User controls ctl Designers dsr Properties Window
  • 13.
    (adtive) focus) 2 1. Alphabetic 2. Categorized Form Layout drag
  • 14.
    Immediate Window New Project New Project File/New Project Visual Basic
  • 15.