Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Berisi jumlah item dalam koleksi.
Properti ini bersifat hanya baca.
Sintaks
iCount = ShellWindows.Count
Nilai properti
Bilangan bulat yang berisi nilai untuk properti Hitung.
Contoh
Contoh berikut menunjukkan Hitungan yang digunakan. Penggunaan yang tepat ditampilkan untuk JScript, VBScript, dan Visual Basic.
Jscript:
<script language="JScript">
function fnShellWindowsCountJ()
{
var objShell = new ActiveXObject("shell.application");
var objShellWindows;
objShellWindows = objshell.Shell_Windows();
if (objShellWindows != null)
{
var nCount;
nCount = objShellWindows.Count;
alert(nCount);
}
}
</script>
Vbscript:
<script language="VBScript">
function fnShellWindowsCountVB()
dim objShell
dim objShellWindows
set objShell = CreateObject("shell.application")
set objShellWindows = objshell.Shell_Windows
if (not objShellWindows is nothing) then
dim nCount
nCount = objShellWindows.Count
alert(nCount)
end if
set objShellWindows = nothing
set objShell = nothing
end function
</script>
Visual Basic:
Private Sub fnShellWindowsCountVB()
Dim objShell As Shell
Dim objShellWindows As ShellWindows
Set objShell = New Shell
Set objShellWindows = objshell.Shell_Windows
If (Not objShellWindows Is Nothing) Then
Debug.Print objShellWindows.Count
End If
Set objShellWindows = 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 |
|
| DLL |
|