FolderItemVerbs.Item 메서드
컬렉션에서 지정된 항목에 대한 FolderItemVerb 개체를 검색합니다.
구문
retVal = FolderItemVerbs.Item(
iIndex
)
매개 변수
-
iIndex [in]
-
형식: Variant
검색할 항목의 인덱스(0부터 시작)입니다. 이 값은 Count 속성 값보다 작아야 합니다.
반환 값
형식: IDispatch**
FolderItemVerb 개체를 수신하는 개체입니다.
예제
다음 예제에서는 Item을 사용하여 제어판 폴더에 사용할 수 있는 컬렉션의 첫 번째 동사를 검색하고 해당 이름을 표시합니다. JScript, VBScript 및 Visual Basic에 대해 적절한 사용법이 표시됩니다.
Jscript:
<script language="JScript">
function fnFolderItemVerbsItemJ()
{
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 objFolderItemVerb;
objFolderItemVerb = objVerbs.Item(0);
if (objFolderItemVerb != null)
{
alert(objFolderItemVerb.Name);
}
}
}
}
</script>
Vbscript:
<script language="VBScript">
function fnFolderItemVerbsItemVB()
dim objShell
dim objFolder2
dim ssfCONTROLS
ssfCONTROLS = 3
set objShell = CreateObject("shell.application")
set objFolder2 = objShell.NameSpace(ssfCONTROLS)
if (not objFolder2 is nothing) then
dim objVerbs
set objVerbs = objFolder2.Self.Verbs
if (not objVerbs is nothing) then
dim objFolderItemVerb
set objFolderItemVerb = objVerbs.Item(0)
if (not objFolderItemVerb is nothing) then
alert(objFolderItemVerb.Name)
end if
set objFolderItemVerb = nothing
end if
set objVerbs = nothing
end if
set objFolder2 = nothing
set objShell = nothing
end function
</script>
Visual Basic:
Private Sub fnFolderItemVerbsItemVB()
Dim objShell As Shell
Dim objFolder2 As Folder2
Dim ssfCONTROLS As Long
ssfCONTROLS = 3
Set objShell = New Shell
Set objFolder2 = objShell.NameSpace(ssfPROGRAMS)
If (Not objFolder2 Is Nothing) Then
Dim objVerbs As FolderItemVerbs
Set objVerbs = objFolder2.Self.Verbs
If (Not objVerbs Is Nothing) Then
Dim objFolderItemVerb As FolderItemVerb
Set objFolderItemVerb = objVerbs.Item(0)
If (Not objFolderItemVerb Is Nothing) Then
Debug.Print objFolderItemVerb.Name
End If
Set objFolderItemVerb = Nothing
End If
Set objVerbs = Nothing
End If
Set objFolder2 = Nothing
Set objShell = Nothing
End Sub
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 |
Windows 2000 Professional, Windows XP [데스크톱 앱만 해당] |
지원되는 최소 서버 |
Windows 2000 Server[데스크톱 앱만] |
헤더 |
|
IDL |
|
DLL |
|