csc115 introduction to computer programming zhen jiang dept. of computer science west chester...

Post on 13-Dec-2015

213 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CSC115 Introduction to Computer Programming

Zhen Jiang

Dept. of Computer Science

West Chester University

West Chester, PA 19383

zjiang@wcupa.edu

Table of Contents Introducation

VB Three steps to develop VB program Feature objects – controls (step 1)

Text box, command button, label, picture box, etc Property setting (step 2) Event description (step 3)

VB Pages 19-21 VB programs display a windows screen (called form)

and its control objects (four of them will be introduced later)

Three steps to create VB program Create the interface; generate position and size of

window control objects (in the form) Set Properties Write the code in code window that will execute when

the events occur.

Text box, p22 Name, Backcolor, Borderstyle, Enabled, Font, Forecolor,

Multiline, Readonly, Text, TextAlign, Visible, ReadOnly

Command button, p26 Name, Backcolor, BackgroundImage, Enabled, Font, ForeColor,

Image, ImageAlign, Text, TextAlign, Visible

Label, p28 Name, AutoSize, BackColor, BackStyle, BoderStyle, Enabled,

Font, ForeColor, Text, TextAlign, Visible

Picture box Name, BackgroundImage, BoderStyle, Image, sizeMode, Visible

List Box, p28 Items

Name (lbl, txt, btn, pic, lst), Table 1, page 29 Fonts, for instance, Windings & J-K-L, etc Advanced property setting, for instance,

Color.Red, page 41

Auto hide of tool box Access key Exit button, me.close() Message box List box

Advanced button functions Copy Clearing Focus and tab order, page 32 Accept button (enter)

Form1.AcceptButton = btn1 Cancel button (Esc)

Form1.CancelButton = btn2

Summary of programming(3-3-3)

3 steps, page 36 For the coding step, 3 sub-steps, page 37

Know what is the action, in your own word Know how to initiate it (how and where to start

the computer’s action) Translation to VB by 3 factors in the right format

Target object Property New setting

top related