问题 填空题

在窗体上画两个文本框,其名称分别为Text1和Text2,然后编写如下事件过程:
Private Sub Form_Load()
Show
Text1.Text=""
Text2.Text=""
Text2.SetFocus
End Sub
Private Sub Text2 KeyDown(KeyCode As Integer,Shift As Integer)
Text1.Text=Text.Text+Chr(KeyCode-4)
End Sub
程序运行后,如果在Text2文本框中输入“efghi”,则Text1文本框中的内容为 【11】

答案

参考答案:ABCDE

解析:[评析] 当用户在Text2中输入字符的时候,会触发Text2_KeyDown事件。该事件的处理代码使得Text1的内容为在原内容的基础上追加一个字符。追加的字符的ASCII值比输入的小4。所以当输入efghi的时候,输出为ABCDE。注意不是abcde,因为KeyCode取的是键码,而不是ASCII码,小写字符的键码等于对应大写字符的ASCII码。

阅读理解

阅读理解。

     I love to tell the story about how I met my best friend-Tiger. We met at the school fair (集市). Each year,

all the fourth-grade classes hold a school fair. Everyone in fourth grade works at the fair. Some sell ice cream,

drinks and snacks. Others take care of the little children who ride the rides.

     I got the second job and I've never regretted it, because that's where I met Tiger. My job was to help little

children get on the back of a little horse. I kept telling the children to wait their turn and holding ice cream for

them while they rode about. One thing was clear to me. I was growing older and should be more responsible

(负责). 

     Suddenly, a boy came to the horse. He took the little horse's reins (缰绳)! The horse stopped,and the girl

on its back started to fall. I was trying to reach the girl when I saw Tiger go by my legs. It held the horse's

reins and pulled the horse away from my legs. I caught the girl just before we both hit the ground. The girl

sat on top of me. She was laughing at the ice cream on my face. The horse's reins were in Tiger's mouth!

    Thanks to Tiger's fast action,I saved the little girl. We were both heroes. And Tiger, the fastest dog I've

ever known became my new best friend.

1. According to the passage, ________ work at the fair.

A. ice cream sellers

B. all the school children

C. little boys and girls

D. the fourth-grade students

2. The writer's job was to ________.

A. take the little horse's reins

B. look after the children

C. get on the back of the horse

D. ride with little children

3. As soon as the little horse stopped, the girl ________.

A. started to fall

B. laughed at the writer

C. hit the ground

D. sat on top of the writer

4. Tiger helped to save the little girl on the horse by ________.

A. going fast by the writer's legs

B. trying to catch the little girl

C. holding the reins with its mouth

D. riding the little horse around

5. From the passage, we know that ________.

A. Tiger was actually a brave dog

B. Tiger wanted to become a hero

C. the writer didn't want to grow up

D. the writer regretted working at the fair

选择题