Metode FolderItem.Verbs
Mengambil objek FolderItemVerbs item. Objek ini adalah kumpulan kata kerja yang dapat dieksekusi pada item.
Sintaks
retVal = FolderItem.Verbs()
Parameter
Metode ini tidak memiliki parameter.
Menampilkan nilai
Jenis: FolderItemVerbs**
Referensi objek ke objek FolderItemVerbs .
Contoh
Contoh berikut menggunakan Kata Kerja untuk mengambil objek FolderItemVerbs yang mewakili kumpulan kata kerja yang dapat dijalankan pada folder Windows. Penggunaan yang tepat ditampilkan untuk JScript, VBScript, dan 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
Persyaratan
Persyaratan | Nilai |
---|---|
Klien minimum yang didukung |
Windows 2000 Professional, Windows XP [hanya aplikasi desktop] |
Server minimum yang didukung |
Windows 2000 Server [hanya aplikasi desktop] |
Header |
|
IDL |
|
DLL |
|
Lihat juga