Click here to load reader

VB 开发应用基础知识 ( 程序设计基础 )

  • View
    184

  • Download
    0

Embed Size (px)

DESCRIPTION

VB 开发应用基础知识 ( 程序设计基础 ). 1 、了解 VB 的简介、安装和功能特点; 2 、熟悉 VB 的集成开发环境 3 、了解程序设计方法的基本步骤; 4 、掌握 VB 基本概念 5 、掌握基本控件的使用方法. 1 VB 的简介、安装和功能特点. 1.1 Visual Basic 简介 1.2 安装 1.3 功能特点. 1.1Visual Basic 6.0 简介. Visual Basic 6.0 简介 Visual Basic 6.0 的三种版本 Visual Basic 6.0 的主要特点. 返回首页. - PowerPoint PPT Presentation

Text of VB 开发应用基础知识 ( 程序设计基础 )

  • VB() 1 VB 2 VB 34VB5

  • 1 VB 1.1 Visual Basic 1.2 1.3

  • 1.1Visual Basic 6.0 Visual Basic 6.0 Visual Basic 6.0 Visual Basic 6.0

  • Visual Basic 6.0 Visual Basic 6.0VB6MicrosoftBASIC

    WindowsVisual Basic

  • Visual Basic 6.0 LearningVisual Basic 6.0Windows ProfessionalVisual Basic 6.0ActiveXInternet EnterpriseVisual Basic 6.0

  • 1.21 486DX/66 MHz Pentium )VGA >=16 MB RAM 2 Windows 95 Windows NT 3.51 Setup.exe

  • 1.3Visual Basic 6.0 1. 2. 3. 4. 5. Windows6.

  • 2 Visual Basic 6.0 2.1Visual Basic 6.0 2.2 Visual Basic 6.0 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10

  • 2.1Visual Basic 6.0 Microsoft Visual Basic 6.0Microsoft Visual Basic 6.0VB

  • 2.2 Visual Basic 6.0 Visual Basic 6.0

  • 2.2 Visual Basic 6.0

  • 2.2 Visual Basic 6.0

  • 2.2 Visual Basic 6.0

  • 2.3 1. 2. 3. 4.

  • 2.3 1.

  • 2.3 2. VB 3. 4

  • 2.3 4. : : ,ActiveX.OCXVB Excel

  • 2.4 Form

  • 2.5 1. 2. 3.

  • 2.5 : : .Vbp .Frm .Bas .Cls .Res .Ocx .Frx

  • 2.5 :

  • 2.6 1. 2. 3. 4. 5.

  • 2.6

  • 2.6 : F4

  • 2.7

  • 2.8 Code F7

  • 2.8 :

  • 2.8 : : :

  • 2.9

  • 2.10 EXEVB20

  • 1. 20

    2. ActiveX ActiveX ActiveX ActiveXOCXWindowsSYSTEM

    ActiveX/

  • ActiveX

  • ActiveXActiveX DLL/EXE ActiveX/ ActiveXDLL/EXE/3. WindowsMicrosoft Excel

  • 3 Visual Basic6.012345

  • 3.1 Visual Basic6.0 1 2 3

  • 3.2

  • 3.3 Visual Basic6.0

  • 3.4 F5

  • 3.4 1VBVB Form

  • 2 VBVisual Basic

  • 3 VB

  • 4

  • 1. 2. l1o03. (Name) Text1Text2Command1 txtInputtxtOutputcmdOk4. 5. 6. .frm.vbp

  • 3.5 Visual Basic6.0.EXE1.2.

  • 3.6 Visual Basic (.Vbp) .frm: .frx,..frx .bas .cls .res ActiveX.ocx

  • VB

    (*.Frm)

    .Bas

    VB

    *.VBP

    1

    2.

    3.Sub

    4.

    Function

    (.Cls)

    1.Sub

    2.

    Function

  • 3.6 Visual Basic Visual Basic (.bas) (.frm)

  • 3.6 Visual Basic .bas .cls .ctl .ctx .dca .ddf CAB .dep .dob ActiveX .

  • 3.6 Visual Basic .dox ActiveX .dsr .dsx .dws .frm .frx .log .oca .pag .pgx .res

  • 3.6 Visual Basic .tlb .vbg Visual Basic .vbl .vbp Visual Basic .vbr .vbw Visual Basic .vbz .wct WebClass HTML

  • 3.6 Visual Basic .dll ActiveX .exe ActiveX .ocx ActiveX .vbd ActiveX .wct WebClass HTML

  • 1 23456

  • VB 1.1 13VB6.0

  • 41Text13,Command1,Command2Command3 33

  • Form1

    Text1

    3

  • Caption

    Form1 Caption lxl Command1 Caption Command2 Caption Command3 Caption Text1 text

  • Command1Visual Basic 6.0Command1Sub Command1_click() Text1.text=VB 6.0End SubVB 6.0Command2

  • Sub Command2_Click() Text1.Text= End SubCommand3Command3_Click() EndEnd Sub

  • 4 VB 4.1 4.2

  • 4.1

  • 4.1

    : : : Form1Command2Menu1Text3

  • 4.1

    VB

  • 4.2 1 VB: :: CaptionWidthFontColor:: .= : Form1.Caption= "" CmdOK.Caption=""

  • 4.2 21:2: Private Sub_[] End Sub

  • 4.2 2: Private Sub Command1_Click( ) Form1.BackColor = vbRed End Sub

  • 4.2 3 VB [][]

  • : FirstForm.Print "Visual Basic" SecondForm.Show MyPicture.Cls

  • 5 Visual Basic5.1 5.2 5.3 5.4

  • 5.1 VBVB6Form1

  • 5.1 (Form) : () :

  • 1.() : 1.Form1

    2. Form12.:1

  • 5.1.1 1Name 2Caption 3Icon 4AutoRedraw 5BackColorForeColor 6BorderStyle

  • 5.1.1 7Apearance 8Font 9Visible 10WindowState 11Enabled 12HeightWidth LeftTop 13Picture 14StartUpPosition 15MaxButton MinButton

  • 5.1.2 1Click2DblClick3Load4MouseDown5MouseUp6MouseMove7Activate ()Deactivate8Resize

  • 5.1.2 : Click, Private Sub Form_Click() Form1.BackColor = vbYellow End Sub : Private Sub Form_Load() Form1.BackColor = vbRed End Sub

  • 5.1.3 1Print 2.72Move [.]Move [[[]]]3Cls Print [.]Cls4Show MDIForm Form [.] Show []5Hide MDIForm Form

  • 5.1.4 1 2 3 4 1Load2UnLoad

  • 5.2 12Tab 3 Alt+

  • 5.2.1 (1) Caption: &Alt(2) Font: (3) Style: 0-Standard() 1-Graphical (4) Picture: (5) DownPicture:

  • 5.2.1 (6) DisabledPicture: (7) Enabled: FalseTrue(8) Visible: (9) Value: True(10) Default: (11) Cancel:

  • 5.2.2 1Click 2GotFocus 3LostFocus 4MouseDown 5MouseUp

  • 5.2.2 Private Sub Command1_MouseDown() Form1.BackColor = vbRed End Sub Private Sub Command1_MouseUp() Form1.BackColor = vbGreen End Sub Private Sub Command1_KeyDown() Form1.Caption = "" End Sub Private Sub Command1_KeyUp() Form1.Caption = "" End Sub

  • 5.2.3 1Move 2SetFocus [.]SetFocus

  • 5.3 5.3.1 5.3.2

  • 5.3.1 (1)Caption(2) Alignment(3) AutoSizeTrueFalse(4) BorderStyle(5) BackStyle(6) WordWrap: True (AutoSizeTrue) False

  • 5.3.2 ClickDblClickChangeMove

  • 5.3.2 : Label1AutoSizeTrue10Private Sub Label1_DblClick() Label1.FontSize = Label1.FontSize + 10End Sub

  • 5.3.2 Move .Move left[,[top][,[width][, height]]] leftx- topy- width height

  • 5.3.2

    Label150 Private Sub Label1_Click() Label1.Move Label1.Left + 50 End Sub

  • 5.4 TextBox2048

  • 5.4.1 (1) Text : Text1.Text = "Visual Basic"(2) MultiLine: (3) PasswordChar: (MultiLineFalse)(4) ScrollBars: () (MultiLineTrue)

  • 5.4.1 (5) SelStart: : Text1.SelStart=0 (6) SelLength: : Text1.SelLength=Len(Text1.Text) Text1(7) Locked: False True()

  • 5.4.2 1 1Change 2LostFocus 3KeyPress 2 SetFocusMove

  • 5.4.3 ChangeSetFocusLoad

  • 1Text2Text3LockedTrueCaptionCaption1620

  • 2

  • a(S)12b

  • * 2

  • 1. VB2. 3. :

  • 4. (Form)(1) NameCaptionBackColorBorderStyleIcon MaxButton MinButton Moveable WindowState (2) : Activate Load Click(3) : PrintShow Cls5. (CommandButton)(1) : Caption & StylePicture EnabledVisible(2) : KeyDownKeyUpClick(3) : SetFocus

  • 6. Label(1): Caption AlignmentAutoSize BorderStyleBackStyleWordWrap (2): ClickDblClick(3): Move7. TextBox(1) : TextMultiLinePasswordChar ScrollBars SelStartSelLengthLocked(2) :ChangeClickDblClickKeyPress GotFocusLostFocus(3): SetFocus

    *