单选题
在窗体上有一名为list1的列表框和名为Command1的命令按钮,要求程序运行后;如果单击命令按钮,则把列表框中所有的列表项目写到顺序文件list.txt 中。下列能完成该操作的程序是______。
A、
Private Sub Command1_Click() Open “c:/listxt”For Input As #1 For i=0 To ListListCount-1 Print #1,List1.List( Next i Close #1 End Sub
B、
Private Sub Command1_lick() Open “c:/listxt”For Output As #1 For i=0 To List1.ListCount Print #1,List1.List( Next i Close #1 End Sub
C、
Private Sub Command1_Click() Open “c:/listxt”For Output As #1 For i=0 To List1.ListCount -1 Print #1,List1. List( Next i C1ese #1 End Sub
D、
Private Sub Command1_Click() Open “c:/listxt”For As #1 For i=0 To List1.ListCount Print #1,List1.List( Next i Close #1 End Sub
【正确答案】
C
【答案解析】
提交答案
关闭