Private Sub dirList_Change()
fileList.Path = dirList.Path ' 设置当前目录 End Sub
Private Sub fileList_Click() Dim s As String ' s为所选文件的全称 If Right(fileList.Path, 1) = \
s = fileList.Path & fileList.FileName Else
s = fileList.Path & \ End If
Label4.Caption = s
If Right(s, 1) <> \' 显示图片 End Sub
Private Sub Form_Load()
fileList.Pattern = txtFile.Text ' 初始化文件列表框 End Sub
Private Sub txtFile_LostFocus() fileList.Pattern = txtFile.Text ' 改变筛选条件 End Sub
第七章 面向对象的编程 一、填空题
1、集合 2、定义了一个对象类型的变量TEMP 二、简答题
1、模块是具有一定功能的代码的集合,VB中提供了三种类型的模块:窗体模块、标准模块、类模块。 第八章 界面设计 一、简答题
1、多文档界面是指在一个父窗口下面可以同时打开多个子窗口。子窗口归属于父窗口,如果父窗口关闭,则所有子窗口全部关闭。
2、窗体的顶部一般含有菜单栏和工具栏,菜单栏中是菜单,菜单中含有菜单项,工具栏上有工具按钮,工具栏上的工具按钮实际上就是菜单中某一菜单选项的功能,工具栏上的工具体现了大部分菜单的功能。
3、应关闭所有窗体,防止数据丢失。 第九章 Visual Basic与数据库
一、简答题 1、表间的关系类型有三种:一对一、一对多和多对多 2、Visua Basic中的记录集有三种类型
第 31 页 共 31 页