问题 问答题

创建名称为Form1的窗体,在窗体上画一个图片框。在图片框的右侧画一个垂直滚动条,其Min属性为100,Max属性为2000,LargeChange属性为120,SmallChange属性为30。在图片框中装入图片,图片框的宽度与图形宽度一致,高度任意,如图4所示。编写一个事件过程,程序运行后,移动滚动条上的滚动块可以放大或缩小图片框。程序中不得使用任何变量。
注意:存盘时必须存放在考生文件夹下,工程文件名为ylc2.vbp,窗体文件名为ylc2.frm。

答案

参考答案:(1)Visual Basic集成环境中,执行“文件”→“新建工程”命令,选择“标准Exe”。创建窗体Form1。
(2)在工具箱中选择图片框控件,在窗体中拖动鼠标建立一个图片框,其名称为Picture1。在属性窗口中设置图片框属性,装入图片。调整图片和图片框宽度保持一致。
(3)在工具箱中选择垂直滚动条控件,在图片框右侧创建垂直滚动条,在其属性窗口设置其Min属性为100,Max属性为2000,LargeChange属性为120,SmallChange属性为30。双击按钮弹出代码窗口,编写事件过程如下:
Private Sub VScrolil_Change()
Picturel.Height=VScrolll. Value
End Sub
(4)按F5键运行程序。如图4所示。
(5)执行“文件”→“保存工程”命令,将工程文件命名为ylc2.vbp,窗体文件命名为 ylc2.frm。

解析:
(1)文本框控件操作是上机考试基本操作中最常见的考点。Visual Basic中可以通过文本框的属性窗口很方便地修改其各项属性,常考的属性包括是否可见、文本输出等。其中文本输出除了通过属性窗口中修改,还可以通过编写代码修改。
(2)图片的装入可以通过修改图片框中属性窗口中的Picture属性输入。图片框的修改可以通过在代码中将属性值赋给Picture控件的各属性来进行。

阅读理解

Tom was one of the brightest boys in the year, with supportive parents. But when he was 15 he suddenly stopped trying. He left school at 16 with only two scores for secondary school subjects. One of the reasons that made it cool for him not to care was the power of his peer(同龄人) group.

The lack of right male(男性的) role models in many of their lives — at home and particularly in the school environment(环境) — means that their peers are the only people they have to judge themselves against.

They don’t see men succeeding in society so it doesn’t occur to them that they could make something of themselves. Without male teachers as a role model, the effect of peer actions and street culture(文化) is all-powerful. Boys want to be part of a club. However, schools can provide the environment for change, and provide the right role models for them. Teachers need to be trained to stop that but not in front of a child’s peers. You have to do it one to one, because that is when you see the real child.

It’s pointless sending a child home if he or she has done wrong. They see it as a welcome day off to watch television or play computer games. Instead, schools should have a special unit where a child who has done wrong goes for the day and gets advice about his problems — somewhere he can work away from his peers and go home after the other children.

小题1:Why did Tom give up studying?

A.He disliked his teachers.

B.His parents no longer supported him.

C.It’s cool for boys of his age not to care about studies.

D.There were too many subjects in his secondary school.小题2:What seems to have a bad effect on students like Tom?

A.Peer groups.

B.A special unit.

C.The student judges.

D.The home environment.小题3:What should schools do to help the problem schoolboys?

A.Wait for their change patiently.

B.Train leaders of their peer groups.

C.Stop the development of street culture.

D.Give them lessons in a separate area.小题4:A teacher’s work is most effective with a schoolboy when he ______.

A.is with the boy alone

B.teaches the boy a lesson

C.sends the boy home as punishment

D.works together with another teacher

单项选择题