1 / 27
文档名称:

Fundamentals of Programming in Visual Basic (VB):在Visual Basic编程基础(VB).ppt

格式:ppt   大小:251KB   页数:27页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Fundamentals of Programming in Visual Basic (VB):在Visual Basic编程基础(VB).ppt

上传人:86979448 2018/4/25 文件大小:251 KB

下载得到文件列表

Fundamentals of Programming in Visual Basic (VB):在Visual Basic编程基础(VB).ppt

相关文档

文档介绍

文档介绍:Fundamentals of Programming in Visual Basic (VB)
Visual Basic Events
Simple Statement
1
Chapter 3
Event
An event is an action, such as the user clicking on a button
Usually, nothing happens in a Visual Basic program until the user does something and generates an event.
What happens is determined by statements. Visual Basic Events
2
Chapter 3
Assignment Statements
Assign a value to a property.
General Form:
source = value
A value on the right-hand side of = is assigned to the left-hand size of =.
3
Chapter 3
Sample Statements
=
= True
= “Hello World”
General Form:
= setting
Value represented by setting is stored into
Color is a structure allowing us to specify various colors
4
Chapter 3
Lab
Refers to the examples in the Lab
5
Chapter 3
Sample Form
txtFirst
txtSecond
btnRed
6
Chapter 3
Focus
When you click on a text box, a cursor appears in the text box, and you can type into the text box.
Such a text box is said to have the focus.
If you click on another text box, the first text box loses the focus and the second text box receives the focus.
7
Chapter 3
Examples of Events



General Form:

This event occurs when a mouse is clicked on the button btnShow
This event occurs when user changes the text of txtBox
This event occurs when the input focus leaves txtBox
8
Chapter 3
The three steps in creating a Visual Basic program:
Create the interface; that is, generate, position, and size the objects.
Set properties; that is, configure the appearance of the objects.
Write the code that executes when events occur.
9
Chapter 3
Code Window
Method Name box
Class Name box
Page tab
Page tab:
1. is a code window
2. [design] is a design window (to manipulate the window appearance)
10
Chapter 3