问题 问答题

完成下列问题:

在名称为Form1的窗体上画一个名称为Shape1的形状控件,位置在窗体的顶部,在属性窗口中将其设置为圆形。画一个名称为Timer1的计时器,在属性窗口中将其设置为不可用,时间间隔为0.5s,窗体如图2所示。请编写窗体的Load事件过程和计时器的事件过程,使得程序一开始运行.计时器即变为可用,且每隔0.5s形状控件向下移动100。


注意:要求程序中不得使用变量,每个事件过程中只能写一条语句。存盘时必须存放在考生文件夹下,工程文件名为sjt2.vbp,窗体文件名为sjt2.frm。

答案

参考答案:[操作步骤]
第1步:新建一个标准的EXE工程,保持现有窗体默认属性值不变。
第2步:在窗体上画一个形状控件,保持其名称Shape1不变,修改其Top属性值为0,修改其Shape属性值为3-Circle。
第3步:在窗体上画一个计时器控件,修改其Enabled属性值为False,修改其Interval属性值为500。
第4步:编写代码。在代码编写窗口中,分别编写窗体的Load事件过程和计时器的Timer事件过程。
Private Sub Form_Load()
Timer1.Enabled=True
End Sub
Private Sub Timer1_Timer()
Shape1.Top=Shape1.Top+100
End Sub
第5步:调试、运行并保存程序。

解析: 形状控件的位置由其Left和Top属性控制,将其Top属性设置为0可使形状控件紧贴窗体的上边界;形状控件的形状由Shape属性控制,要显示为圆形,则需要将Shape属性设置为3-Circle。计时器控件的是否可用由Enabled属性控制,在计时器控件的Timer事件过程中改变形状控件的Top属性可以使得形状控件在竖直方向连续移动。

单项选择题

Work is a very important part of life in the United States. When the early Protestant immigrants came to this country, they brought the idea that work was the way to God and heaven. This attitude, the Protestant Work Ethic, still influences America today. Work is not only important for economic benefits, the salary, but also for social and psychological needs, the feeling of doing something for the good of the society. Americans spend most of their lives working, being productive. For most Americans, their work defines them: they are what they do. What happens then, when a person can no longer work Almost all Americans stop working at the age of sixty-five or seventy and retire. Because work is such an important part of life in this culture, retirement can be very difficult. Retirees often feel that they are useless and unproductive. Of course, some people are happy to retire; but leaving one’s job, whatever it is, is a difficult change, even for those who look forward to retiring. Many retirees do not know how to use their time or they feel lost without their jobs. Retirements can also bring financial problems. Many people rely on Social Security checks every month. During their working years, employees contribute a certain percentage of their salaries to the government. Each employer also gives a certain percentage to the government. When people retire, they receive this money as income. These checks do not provide enough money to live on, however, because prices are increasing very rapidly. Senior citizens, those over sixty-five, have to have savings in the bank or other retirement plans to make ends meet. The rate of inflation is forcing prices higher each year; Social Security checks alone cannot cover these growing expenses. The government offers some assistance, Medicare(health care)and welfare (general assistance), but many senior citizens have to change their life styles after retirement. They have to spend carefully to be sure that they can afford to buy food, fuel and other necessities.
Of course, many senior citizens are happy with retirement. They have time to spend with their families or enjoy their hobbies. Some continue to work part time, others do volunteer work. Some, like those in the Retired Business Executives Association, even help young people to get started in new business. Many retired citizens also belong to "Golden Age" groups. These organizations plan trips and social events. There are many chances for retirees.
American society is only beginning to be concerned about the special physical and emotional needs of its senior citizens. The government is taking steps to ease the problem of limited income. They are building new housing, offering discounts in stores and museums and on buses, and providing other services such as free courses, food service, and help with housework. Retired citizens are a rapidly growing percentage of the population. This part of the population is very important and we must meet their needs. After all, every citizen will be a senior citizen some day.

When Americans stop work, it’s difficult for them to ______.

A. get Social Security checks
B. feel productive
C. enjoy themselves


D. be religious

单项选择题