请高手指点!
------解决方案--------------------
用listbox控件
------解决方案--------------------
有个dirlist()函数
------解决方案--------------------
用下拉列表控件
------解决方案--------------------
以下控件都可以用来获取文件夹内的文件列表.
ListBox, DropDownListBox, PictureListBox, and DropDownPictureListBox
------解决方案--------------------
long ll_row,ll_count
string ls_filetype,ls_dir,ls_filename
if right(as_dir,1)= '\ ' then
ls_filetype = as_dir + "*.* "
ls_dir = as_dir
else
ls_filetype = as_dir + "\*.* "
ls_dir = as_dir + "\ "
end if
lb_1.dirlist(ls_filetype ,0)
ll_count = lb_1.TotalItems()
for ll_row=1 to ll_count
//逐个删除文件
lb_1.SelectItem(ll_row)
ls_filename = ' '
ls_filename = ls_dir + lb_1.SelectedItem()
if FileExists(ls_filename) then
//删除
FileDelete( ls_filename )
end if
next
lb_1.reset()
//释放目录
if right(gs_outputdir,1)= '\ ' then
ls_filetype = gs_outputdir + "*.* "
else
ls_filetype = gs_outputdir + "\*.* "
end if
lb_1.dirlist(ls_filetype,0)
//删除目录
RemoveDirectory(as_dir)
------解决方案--------------------
用API麻烦
定义一个ListBox变量,再使用
ListBox lb_var
lb_var.dirlist()
------解决方案--------------------
函数:dirlist
控件:ListBox, DropDownListBox, PictureListBox, and DropDownPictureListBox controls
如:lb_1.DirList( "C:\EMPLOYEE\*.TXT ", 0)
------解决方案--------------------
我也想了解,谢谢LZ.
------解决方案--------------------
没遇到过这种情况.
------解决方案--------------------
用不太多,不过也学习了一下
------解决方案--------------------
没有用过,学习一下!
------解决方案--------------------
PFC 中好像有。