FolderItemVerbs.Count 속성
컬렉션의 항목 수를 포함합니다.
이 속성은 읽기 전용입니다.
구문
iCount = FolderItemVerbs.Count
속성 값
Count 속성을 받는 정수입니다.
예제
다음 예제에서는 Count를 사용하여 제어판 폴더에 사용할 수 있는 동사 수를 검색합니다. JScript, VBScript 및 Visual Basic에 대해 적절한 사용법이 표시됩니다.
Jscript:
<script language="JScript">
function fnFolderItemVerbsCountJ()
{
var objShell = new ActiveXObject("shell.application");
var objFolder2;
var ssfCONTROLS = 3;
objFolder2 = objShell.NameSpace(ssfCONTROLS);
if (objFolder2 != null)
{
var objVerbs;
objVerbs = objFolder2.Self.Verbs();
if (objVerbs != null)
{
var nCount;
nCount = objVerbs.Count;
alert(nCount);
}
}
}
</script>
Vbscript:
<script language="VBScript">
function fnFolderItemsCountVB()
dim objShell
set objShell = CreateObject("shell.application")
if (not objShell is nothing) then
dim objFolder
dim ssfWINDOWS
ssfWINDOWS = 36
set objFolder = objShell.NameSpace(ssfWINDOWS)
if (not objFolder is nothing) then
dim objFolderItems
set objFolderItems = objFolder.Items()
if (not objFolderItems is nothing) then
dim nCount
nCount = objFolderItems.Count
alert(nCount)
end if
set objFolderItems = nothing
end if
set objFolder = nothing
end if
set objShell = nothing
end function
</script>
Visual Basic:
Private Sub fnFolderItemsCountVB()
Dim objShell As Shell
Dim objFolder As Folder
Dim ssfWINDOWS As Long
ssfWINDOWS = 36
Set objShell = New Shell
Set objFolder = objShell.NameSpace(ssfWINDOWS)
If (Not objFolder Is Nothing) Then
Dim objFolderItems As FolderItems
Set objFolderItems = objFolder.Items
If (Not objFolderItems Is Nothing) Then
Dim nCount As Integer
nCount = objFolderItems.Count
Debug.Print nCount
End If
Set objFolderItems = Nothing
End If
Set objFolder = Nothing
Set objShell = Nothing
End Sub
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 |
Windows 2000 Professional, Windows XP [데스크톱 앱만 해당] |
지원되는 최소 서버 |
Windows 2000 Server[데스크톱 앱만] |
헤더 |
|
IDL |
|
DLL |
|