Visual Basic 6

Click here to load reader

  • date post

    24-Mar-2016
  • Category

    Documents

  • view

    230
  • download

    5

Embed Size (px)

description

Visual Basic 6

Transcript of Visual Basic 6

  • 1

    VB 6.0 v1.3 / e-pi / / - pi

    pi VISUAL BASIC 6

    pi

    1.3 e-pi, -2, 2003-2006

    http://web.auth.gr/e-topo

    2006

  • 2

    VB 6.0 v1.3 / e-pi / / - pi

    .

    1 pi Visual Basic. 3 2 , , , ,

    . 18

    3 . 60 4 (pi, , , ).

    . 71

    5 . 80 6 . 96 7 (pipi ). 105 8 () pipi. 120 9 Modules, pi (sub-routines)

    (functions). 145

    Visual Basic For Applications (VBA) 154 163 DLL 187 pi 195

  • 3

    VB 6.0 v1.3 / e-pi / / - pi

    1 pi Visual Basic

    Visual Basic (VB), pi Microsoft

    Visual Studio, pi pi

    GW Basic.

    GW Basic pi MS DOS

    .

    pi pi .

    pi pi

    Console Applications, pi pi,

    pi , .

    pi VB.

    .

    pi

    , pi pi,

    pi . pi pi

    pi pi pipi

    . pi pi .

    VB

    (pi Microsoft) pi

    pi - (Excel, Word, AutoCAD, Access,

    ).

    pi pi pi GW Basic

    pi pi Basic A (IBM), Quick Basic

    (Microsoft) Turbo Basic (Borland).

    Visual Basic VB pi

    , pi pi . pi

    start ( windows)

    pi pi.

  • 4

    VB 6.0 v1.3 / e-pi / / - pi

    pi pi

    pi- Programs

    , pi

    pi pi

    pi :

    pi , pi

    Microsoft Visual Studio

    6.0 pi pi

    pi MS VB6:

    pi Visual Basic.

    , pi

    pi , pi pi pi

    VB.

  • 5

    VB 6.0 v1.3 / e-pi / / - pi

    Visual Basic VB pi

    pi pi pi pi .

    pi

    pi .

    Standard

    EXE,

    pi,

    pi

    .

    pipi , pi pi, pi pi:

    1. New: pi pi pi pi

    pi .

    2. Existing: pi

    pi pi (pi/recent,

    pi).

    3. Recent: pi pi pi pi

    pi. pi pi pi

    project pi pi .

    1. pi project, (module/class module,

    [ActiveX], [dll] ).

    2. pi pi, pi pi pi

    , project pi pi,

    , , pi, .

  • 6

    VB 6.0 v1.3 / e-pi / / - pi

    pi Standard EXE pi

    VB:

    pi pi, pi pi-pi.

    pi , pi

    pi project.

    :

  • 7

    VB 6.0 v1.3 / e-pi / / - pi

    ToolBox ( )

    .

    pi pi

    project.

    .

    pi.

    pi

    . , pi pi

    pipi pi pi.

    pi pi.

    Properties Window ( )

    . pi pi

    (, ,

    ),

    (pi pi

    pi ),

    pi pi , ,

    pi pi .

    , pi

    , (events)

    (methods).

  • 8

    VB 6.0 v1.3 / e-pi / / - pi

    1. (Form) pi pi

    project , pi pi

    pi .

    pi

    pi pi pi pi .

    pi. (

    ) . (

    pi) (pi.. DLL) pi .

    2. pi pi

    pi. pi,

    pi (button) pi pi ,

    pi, , pi pi pi pi .

    pi pi pi pi

    .

    3. pi pi pi

    pipi pi, pi pi

    pi. pi, button

    move. pipi. pi.

    pi ,

    pi.

  • 9

    VB 6.0 v1.3 / e-pi / / - pi

    Project Explorer ()

    O Project Explorer

    pi pi

    pi

    project pi

    pipi

    pi

    .

    , modules,

    class modules .

    Module pi pi

    pi. , ,

    pi pi

    pi. module pi pi

    , pi.

    Class Module pi VB. class

    module (compilation & build),

    DLL. pi

    pi pi pi pipi project. pi- pi , DLL (Dynamically Linked Library).

    Form Layout (pipi )

    pi

    . pi

    pipi pi

    pi. pi

    ,

    pi .

  • 10

    VB 6.0 v1.3 / e-pi / / - pi

    Immediate Window ( pi)

    pi

    pi .

    pi

    pipi

    (debuging) project

    pi pi

    pi .

    Menu ( pi)

    pi pi

    pi VB.

    pi :

    File

    Project

    pi Project

    pi project

    pi project ...()

    pi

    pi

    EXE pi project

    (

    )

    pi project

    pi VB

  • 11

    VB 6.0 v1.3 / e-pi / / - pi

    Edit

    Undo / Redo

    pipi

    pi

    pi

    pi

  • 12

    VB 6.0 v1.3 / e-pi / / - pi

    View

    Immediate Window

    Project Explorer

    Properties Window

    ToolBox

    pi ToolBars

    Project

    Module

    Class Module

    Project

    (References): pipi project pi

    pi .

    pi pi-.

  • 13

    VB 6.0 v1.3 / e-pi / / - pi

    (Components): pi pi

    pi ToolBox VB, pi pi pi

    pi, Microsoft, . pi

    pi pi pi pi

    pi .

  • 14

    VB 6.0 v1.3 / e-pi / / - pi

    Project (Project Properties): pi

    project pi , ,

    , . pi

    , pi pi pi

    pi pi.

    Format

    pi

    2

    /

    .

    pi pi

  • 15

    VB 6.0 v1.3 / e-pi / / - pi

    Run

    /

    Tools

    /pi

    pi

    pi (Options): pi pi pi

    studio Visual Basic. pi ,

    , , pi

    , pi pi .

  • 16

    VB 6.0 v1.3 / e-pi / / - pi

    Help

    Microsoft

    (Help) Visual Basic pi pi .

    pi Visual Studio MSDN.

    pi , pi , ,

    pi.

    pi pi Visual Basic.

    pipi pi pi pi

    project.

  • 17

    VB 6.0 v1.3 / e-pi / / - pi

    ;

    1. pi pi

    ( ) pi pi ToolBox.

    pi pi pi

    pi .

    , .

    a. pi pi .

    b. pi .

    c. pi

    pi pi pi .

    2. .

    pi ().

    3. pi Properties Window pi

    pi .

    1. pi project ;

    2. pi pi pi ;

    3. pi pi pi pi ToolBox;

    4. pi pi pi ;

    5. project ;

    6. pi pi pi ;

    7. pi pi ;

    8. module;

    9. pi project pi pi pi;

    10. pi pi ;

    11. pi;

    1. () .

    . : pi 2000,

    1500. pi .

    Press me!. pi.

  • 18

    VB 6.0 v1.3 / e-pi / / - pi

    2 , , , ,

    (Controls).

    pi pi

    pi. pi, pi

    pi (Command Button)

    pi (pi ).

    pi pi pipi pi

    . pi pi pi; pi

    pi pi pi .

    pi, pi pi pi.

    pi, pi.

    !

    pi

    pi , .

  • 19

    VB 6.0 v1.3 / e-pi / / - pi

    pi , pi

    pi pi pi pi

    pipi pi .

    ) pi pi .

    ) pi ( pi )

    pi .

    ) pi (pi ,

    pi ).

    Pointer (): pi , pi. , .

    pipi pi .

    Label ():

    pi

    pi

    pi

    ( /

    caption).

    pi pi

    pi

    .

    ( pi pi pi Properties Window)

    pi pi pi.

    pi pi (Name)

    pi

    Label.

    pipi

    (pi

    pi

    )

    pi

    Visual Basic.

    pi

    pi,

    .

    Alignment

    Label

    0 1 2 0:

    1:

    2:

    AutoSize

    Label

    True False True: Label =

    False: Label =

    .

    BackColor

    -

    pipi

    (pi

    -

    Label

  • 20

    VB 6.0 v1.3 / e-pi / / - pi

    Label. pi

    pi)

    :

    VbRed, vbGreen,

    vbCyan, vbYellow,

    vbWhite

    pi .

    BackStyle

    Label

    ( pipi

    )

    0 1 0: ()

    1: (pi)

    BorderStyle

    pi pi

    Label .

    0 1 0: pi

    1: pi

    Caption pi

    Label

    pipi ,

    ,

    pipi

    pipi.

    Label

    pi

    Caption.

    Enabled

    Label

    pi .

    True False True:

    pi

    (pi.. pi

    pi

    pi

    pi )

    False:

    pi .

    H Label

    pi

    pipi.

    Font pi

    pi pi

    pi

    Caption ()

    pipi

    pi

    pi

    pi. pi

    pi

    (pi, )

    .

    pi

    .

    ForeColor

    .

    pipi

    (pi

    pi

    pi)

    :

    VbRed, vbGreen,

    vbCyan, vbYellow

    pi

    pi.

    Height pi

    Label twip.

    pi

    AutoSize

    True.

    pipi

    .

    .

    Label (

    pi

    )

    pi .

  • 21

    VB 6.0 v1.3 / e-pi / / - pi

    Left

    pi Label

    pi

    twip.

    pipi

    .

    pi Label

    pi

    pi

    .

    MousePointer pi

    pi

    pi pi pi

    Label.

    pipi

    Pointer (pi

    pi

    pi)

    pi pi

    Label

    pi.

    ToolTipText

    pi

    pi

    pi pi

    Label.

    pipi ,

    ,

    pipi

    pipi.

    pi

    pi (

    / )

    Top

    pi Label

    pi pi

    twip.

    pipi

    .

    pi Label

    pi

    pi pi

    .

    Visible