假定在工程文件中有一个标准模块,其中定义了如下记录类型 Type Books Name As String*10 TelNum As String*20 End Type 要求当执行事件过程Commandl_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是:
A. Prirate Sub Commandl Click() Dim B As Books Open"C:\Person.txt"For Output As #1B.Name=InputBox("输入姓名")B.TelNum=InputBox("输入电话号码") Write #1,B.Name,B.TelNum Close #1 End Sub
B. Pdrate Sub Commandl Cliok() Dim B As Books Open"c:\Person.txt"For Input As #1B.Name=InputBox("输入姓名")B.TeINum=InputBox("输入电话号码") Print #1,B.Name,B.TelNum Close #1 End Sub
C. Private Sub Commandl Click() Dim B As Books Open"c:\Person.txt"For Output As #1 Name=InputBox("输入姓名") TelNunl=InputBox("输入电话号码") Write #1,B Close #1 End Sub
D. Private Sub Commandl Click() Dim B As Books Open"c:\Person.txt"For Input As #1 Name=InputBox("输入姓名") Temum=InputBox("输入电话号码") Write #1,B.Name,B.TelNuin Close #1 End Sub
查看答案
假定有下表所列的菜单结构:
要求程序运行后,如果单击菜单项“大图标”,则在该菜单项前添加一个“√”。以下正确的事件过程是______。
A. Private Sub bigicon_Click() bigicon.Checked=False End Sub
B. Pfivate Sub bigicon_Click() Me.appear.bigicon.Checked=True End Sub
C. Private Sub bigicon_Click() bigicon.Checked=Tree End Sub
D. Private Sub bigicon_Click() appear.bigicon.Checked=Tree End Sub
假定通用对话框的名称为CommonDialogl,命令按钮的名称为Commandl,则单击命令按钮后,能使打开的对话框的标题为"New Title"的事件过程是______。
A. Pdvate Sub Commandl_click() CommonDialogl.DialogTitle="New Title" CommonDialogl.ShowPrinter End Sub
B. Private Sub Cormnandl_click() CommonDialogl.DialogTitle="New Title" CommonDialogl.ShowFont End Sub
C. Private Sub Commandl_click() CommonDialogl.DialogTitle="New Title" CommonDialogl.ShowOpen End Sub
D. Pfivate Sub Commandl_click() CommonDialogl.DialogTitle="New Title" CommonDialogl.ShowColor End Sub
函数过程F1的功能是:如果参数b为奇数,则返回值为1,否则返回值为0。以下能正确实现上述功能的代码的是______。
A. Function Fl(b As Integer) If b Mod 2=0 Then Return 0 Else Return 1 End If End Function
B. Function Fl(b As Integer) If b Mod 2=0 Then F1=0 Else F1=1 End If End Function
C. Function F1(b As Integer) If b Mod 2=0 Then F1=1 Else F1=0 End If End Function
D. Function Fl(b As Integer) If b Mod 2<>Then Return 0 Else Return 1 End If End Function
A Minor Microsurgery
Last year, Sean Martinovich, from Whitianga, had life-saving surgery when a golf-sized tumor was removed from his brain stem. But the operation left half his face paralysed. He talked with a slur, sometimes dribbled out of the side of his mouth and could not close his eye properly. Although he could run around with the other boys in the playground, when they laughed he could not laugh with them. Without a smile, he could suffer psychologically and emotionally.
Last week, 6-year-old Sean had seven hours of microsurgery that should give him back his smile. Doctor Bartlett removed a nerve from the back of one of Sean's legs and transplanted it into his face. On the normal side of his face the nerve divides into lots of little branches. "We'll cut those nerve branches and then we'll take a nerve graft from one leg and tunnel it across his face from one side to the other and join that on to the nerve that's been cut on the good side of his face. " Doctor Bartlett said, before the operation. "If this was not fixed he could face physical and emotional problems as he got older," Doctor Bartlett said. "Socially people can become quite withdrawn because of the face paralysis. It's easy for people, especially children, to become rather emotionless because they prefer the flatness of no movement on either side to the weirdness of an asymmetry of smiling on one side and having this twisted face. "
Scan is not smiling yet. Over the next six months the nerves will grow across the face to the damaged side and after that movement will hopefully come back. Sean's parents, Steve and Wendy Martinovich, said they had been through a year of hell. But their son was a determined boy who just got on with it, said Mrs Martinovich. They are amazed at the technology that they hope will restore the cheeky smile they love so much. For Doctor Bartlett the microsurgery is almost routine. For Sean's parents, it is a miracle.
How old was Scan Martinovich when the golf-sized tumor was removed from his brain stem? ______.
A. 4 years old.
B. 5 years old.
C. 6 years old.
D. 7 years old.