标题:[求助]第3问:帮忙注释以下语句可以吗?
取消只看楼主
半点心
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2004-12-17
 问题点数:0 回复次数:0 
[求助]第3问:帮忙注释以下语句可以吗?

相信大家看到也有点烦,但帮帮小弟吧,我是自学的,没其它朋友可以问了帮帮忙吧,最好能详细及通俗点, 谢谢!!

Private Sub ShowAllPhotos() '在列表框lstAllPhotos中列出所有像册内照片名称并把对数组Photos赋值 Dim i As Integer '声明一个循环计数器 Dim MyPhotoCount As Integer '声明一个图片张数变量,为整数类型 PhotoFile = App.Path & "\Photos.ini" '读取ini文件的文件路径 If Len(Dir(PhotoFile)) = 0 Then '这里的Dir是什么意思? MsgBox "文件" & PhotoFile & "不存在!", vbExclamation, "错误提示" Else RecordLength = LenB(CurrentRecord) '计算每条记录的长度 FileNum = FreeFile 请问这里的FreeFile是什么?在程序中第一次出现,应该不是自定义变量 MyPhotoCount = 0 PhotoCount = 0

以下这些希望能帮忙注释谢谢!! '以下用 Open 语句打开文件 Open PhotoFile For Random As FileNum Len = RecordLength Do MyPhotoCount = MyPhotoCount + 1 ReDim Preserve Photos(1 To MyPhotoCount) As PhotoType Get FileNum, MyPhotoCount, CurrentRecord If CurrentRecord.PhotoNo = 1 Then PhotoCount = PhotoCount + 1 Photos(PhotoCount).PhotoNo = CurrentRecord.PhotoNo Photos(PhotoCount).FileName = Trim(CurrentRecord.FileName) Photos(PhotoCount).PhotoName = Trim(CurrentRecord.PhotoName) End If Loop Until Photos(MyPhotoCount).PhotoNo = 0 Close FileNum Me.lstAllPhotos.Clear For i = 1 To PhotoCount Me.lstAllPhotos.AddItem (Photos(i).PhotoName) Next i End If End Sub

搜索更多相关主题的帖子: 注释 语句 计数器 Integer 
2004-12-18 01:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-9562-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.349956 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved