VB如何获取文件夹下的所有文件的名字并显示在label上
1个回答
展开全部
Private Sub Command1_Click()
Dim F As String, I As Long, nPath As String, nName As String
nName = Dir("D:\*.*", 7)
Label1.Caption = ""
Do
If nName = "" Then Exit Do
Label1.Caption = Label1.Caption & nName & vbCrLf
nName = Dir()
Loop
End Sub
label控件显示的内容有限,建议你还是用别的控件。
Dim F As String, I As Long, nPath As String, nName As String
nName = Dir("D:\*.*", 7)
Label1.Caption = ""
Do
If nName = "" Then Exit Do
Label1.Caption = Label1.Caption & nName & vbCrLf
nName = Dir()
Loop
End Sub
label控件显示的内容有限,建议你还是用别的控件。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询