问题 填空题

设窗体上有一个名称为CD1的通用对话框,一个名称为Text1的文本框和一个名称为Command1的命令按钮。程序执行时,单击Command1按钮,则显示打开文件对话框,操作者从中选择一个文本文件,并单击对话框上的“打开”按钮后,则可打开该文本文件,并读入一行文本,显示在Text1中。下面是实现此功能的事件过程,请填空。
Private Sub Command1_Click()
CD1.Filter="文本文件1*.txt(Word文档)*.doc"
CD1.Filterinder=1
CD1.ShowOpen
If CD1.FileName<>" "Then
Open______For Input As # 1
Line Input #1,ch$
Close #1
Text1.Text=______
End If
End Sub

答案

参考答案:CD1.FileName ch

解析: FileName属性是用来设置或返回要打开的文件的路径及文件名,由if语句的判断当文件存在时,则打开该文件,以便从文件中读出记录。
语句Line Input#1,ch$是从文件1中读取一个完整的行,并把它赋给一个字符串变量ch,而本题要求该行文本要显示在Text.1中,故应该填ch。

阅读理解

阅读理解

     Boys need friends, suffer when they don't believe they have any, and worry over the ups and downs

of relationships. Many adults believe that somehow boys need friends less than girls do, in truth, though,

no boy is an island; boys value their friends throughout childhood and adolescence and are happier and

healthier when they have solid relationships with peers(同龄人).

     Despite the common belief that girls are better at relationships, most boys consider their friends a very

important part of their lives, and boys may actually be better at keeping friendships than girls are. A

recent study of 10 to 15yearold boys and girls found that girls' friendships are actually more fragile. Girls

tend to say and do hurtful things to each other more frequently than boys, and girls are more hurt by the

end of a friendship.

     Boys are the living definition of the phrase "peer group"; they love games with rules, competition,

and doing things together. Boys seem to enjoy, even need the opportunity to test themselves against

others, and many lasting friendships begin in karate(空手道) class or on the basketball court.

Competence and skill are widely respected; being picked last for a team or left out altogether is an

experience that can haunt(萦绕心头) a boy for years.

     As boys mature, the friendship becomes even more important, and it frequently widens to include

girls. During the teen years, friends can become the most important part of a boy's life-and a part in

which his parents are not included. The confusion of being a teenager leads boys to form close bonds

with friends. There is the sense for many boys that a friend is someone who is "always there for me",  

someone he can trust. They may be partners in crime or partners in study, but the friendship of

adolescent boys can run surprisingly deep.

1. The common belief of adults is that boys________.

A. don't care about others as much as girls

B. don't value friendship as much as girls

C. have the same friendship as girls

D. have healthier friendship than girls

2. According to the text, boys' friendship________.

A. is usually built around active play

B. tends to be in small groups

C. can bear mutual hurt between friends

D. doesn't suffer from failure

3. The author mentions the study in the second paragraph to prove ________.

A. many people believe girls are better at relationships

B. most boys consider their friends very important

C. boys may be better at keeping friendships than girls

D. boys may be more active in a friendship

4. As a boy gets older, he tends to________.

A. widen his circle of friends to include different kinds of people

B. shift his focus from his friends to himself

C. leave his parents out of his friendship

D. be confused about what a friendship is

5. What's the best title for the text?

A. Friendships between Boys and Girls

B. Boys and Their Friendship

C. Childhood and Adolescent Friendship

D. Tips on Making Friends with Boys

单项选择题