📄 20174.html
字号:
<html>
<head>
<title>Re: 用vb6取得某个目录下的所有目录----可以使用dir()</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 用vb6取得某个目录下的所有目录----可以使用dir()</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by 小v on October 15, 1999 at 08:47:40:<p>
In Reply to: <a href="20161.html">用vb6取得某个目录下的所有目录(不用Dirlist)</a> posted by aa on October 14, 1999 at 19:43:05:<p>
: 用vb6取得某个目录下的所有目录(不用Dirlist)<p>使用DIR(), 以下范例摘自vb6使用说明档:<p>Dim MyPath As String, MyName As String<br>MyPath = "c:\win95\" ' Set the path.<br>MyName = Dir(MyPath, vbDirectory) ' Retrieve the first entry.<br>Do While MyName <> "" ' Start the loop.<br> ' Ignore the current directory and the encompassing directory.<br> If MyName <> "." And MyName <> ".." Then<br> ' Use bitwise comparison to make sure MyName is a directory.<p>If (GetAttr(MyPath & MyName) And vbDirectory) = vbDirectory Then<br> Debug.Print MyName ' Display entry only if it<br> End If ' it represents a directory.<br> End If<br> MyName = Dir ' Get next entry.<br>Loop<p><br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 20174-->
</ul><!--end: 20174-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -