重新整理 [ 開始] 功能表的內容。 僅適用于 Windows XP 之前的系統。
語法
iRetVal = Shell.RefreshMenu()
Shell.RefreshMenu() As Integer
參數
這個方法沒有任何參數。
備註
RefreshMenu提供的功能會在 Windows XP 或更新版本下自動處理。 請勿在該作業系統下呼叫這個方法。
範例
下列範例顯示使用中的 RefreshMenu 。 JScript、VBScript 和 Visual Basic 會顯示適當的使用方式。
Jscript:
<script language="JScript">
function fnShellRefreshMenuJ()
{
var objShell = new ActiveXObject("shell.application");
objShell.RefreshMenu();
}
</script>
VBScript:
<script language="VBScript">
function fnShellRefreshMenuVB()
dim objShell
set objShell = CreateObject("shell.application")
objShell.RefreshMenu
set objShell = nothing
end function
</script>
Visual Basic:
Private Sub fnShellRefreshMenuVB()
Dim objShell As Shell
Set objShell = New Shell
objShell.RefreshMenu
Set objShell = Nothing
End Sub
規格需求
| 需求 | 值 |
|---|---|
| 最低支援的用戶端 |
Windows 2000 Professional、Windows XP [僅限桌面應用程式] |
| 最低支援的伺服器 |
Windows 2000 Server [僅限桌面應用程式] |
| 標頭 |
|
| Idl |
|
| DLL |
|