FolderItem.Verbs 메서드
항목의 FolderItemVerbs 개체를 검색합니다. 이 개체는 항목에서 실행할 수 있는 동사의 컬렉션입니다.
구문
retVal = FolderItem.Verbs()
매개 변수
이 메서드에는 매개 변수가 없습니다.
반환 값
형식: FolderItemVerbs**
FolderItemVerbs 개체에 대한 개체 참조입니다.
예제
다음 예제에서는 동사를 사용하여 Windows 폴더에서 실행할 수 있는 동사 집합을 나타내는 FolderItemVerbs 개체를 검색합니다. JScript, VBScript 및 Visual Basic에 대해 적절한 사용법이 표시됩니다.
Jscript:
<script language="JScript">
function fnFolderItemVerbsJ()
{
var objShell = new ActiveXObject("shell.application");
var objFolder2;
var ssfWINDOWS = 36;
objFolder2 = objShell.NameSpace(ssfWINDOWS);
if (objFolder2 != null)
{
var objFolderItem;
objFolderItem = objFolder2.Self;
if (objFolderItem != null)
{
var objItemVerbs;
objItemVerbs = objFolderItem.Verbs();
if (objItemVerbs != null)
{
// Add code here
}
}
}
}
</script>
Vbscript:
<script language="VBScript">
function fnFolderItemVerbsVB()
dim objShell
set objShell = CreateObject("shell.application")
if (not objShell is nothing) then
dim objFolder2
dim ssfWINDOWS
ssfWINDOWS = 36
set objFolder2 = objShell.NameSpace(ssfWINDOWS)
if (not objFolder2 is nothing) then
dim objFolderItem
set objFolderItem = objFolder2.Self
if (not objFolderItem is nothing) then
dim objItemVerbs
set objItemVerbs = objFolderItem.Verbs
if (not objItemVerbs is nothing) then
'Add code here
end if
set objItemVerbs = nothing
end if
set objFolderItem = nothing
end if
set objFolder2 = nothing
end if
set objShell = nothing
end function
</script>
Visual Basic:
Private Sub fnFolderItemVerbsVB()
Dim objShell As Shell
Dim objFolder2 As Folder2
Dim ssfWINDOWS As Long
ssfWINDOWS = 36
Set objShell = New Shell
Set objFolder2 = objShell.NameSpace(ssfWINDOWS)
If (Not objFolder2 Is Nothing) Then
Dim objFolderItem As FolderItem
Set objFolderItem = objFolder2.Self
If (Not objFolderItem Is Nothing) Then
Dim objItemVerbs As FolderItemVerbs
Set objItemVerbs = objFolderItem.Verbs
If (Not objItemVerbs Is Nothing) Then
'Add code here
End If
Set objItemVerbs = Nothing
Else
'FolderItem object returned nothing.
End If
Set objFolderItem = Nothing
Else
'Folder object returned nothing.
End If
Set objFolder2 = Nothing
Set objShell = Nothing
End Sub
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 |
Windows 2000 Professional, Windows XP [데스크톱 앱만 해당] |
지원되는 최소 서버 |
Windows 2000 Server[데스크톱 앱만] |
헤더 |
|
IDL |
|
DLL |
|
추가 정보