首页 | 官方网站   微博 | 高级检索  
     

基于VB文件控件的递归算法及其应用
引用本文:胡小兵 袁锐. 基于VB文件控件的递归算法及其应用[J]. 微机发展, 2004, 14(5): 102-104
作者姓名:胡小兵 袁锐
作者单位:重庆大学数理学院 重庆400044(胡小兵),重庆大学软件学院 重庆400044(袁锐)
摘    要:为了在Windows98/95中一次性设置某文件夹下的所有文件的属性(如只读、存档、系统和隐藏属性等),文中通过VB中的文件控件(DriveListBox,DirListBox和FileListBox)的协同工作,并利用递归算法来达到遍历该目录下所有文件的目的。在遍历文件的过程中,通过相应的WindowsAPI函数将所有文件设置成所需要的属性。在VB上编程实现了该算法,程序结果显示本算法的可行性且具有极高的灵活性。

关 键 词:VB文件控件  递归算法  遍历  WindowsAPI
文章编号:1005-3751(2004)05-0102-03
修稿时间:2003-09-28

Recursion Algorithm Based on File Controls of VBand Its Application
HU Xiao-bing,YUAN Rui. Recursion Algorithm Based on File Controls of VBand Its Application[J]. Microcomputer Development, 2004, 14(5): 102-104
Authors:HU Xiao-bing  YUAN Rui
Affiliation:HU Xiao-bing1,YUAN Rui2
Abstract:In order to set the attribute (such as the attributes of read only,archive,system and hidden,etc.) of the files under some folder in one times,propose a recursion algorithm which utilize the file controls in VB to traversal all of the files under this folder by recursion.In the processing of traversal,the attribute of the files are set by Windows API function. The algorithm is implemented in VB and the running results shows that algorithm is feasible and has great flexibility.
Keywords:file control of VB  recursion algorithm  traversal  Windows API  
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号