共用方式為


SystemEvents.LowMemory 事件

定義

警告

This event has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202

警告

This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202

警告

The LowMemory event has been deprecated and is not supported.

當系統可用的 RAM 不足時發生。

public:
 static event EventHandler ^ LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This event has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public static event EventHandler LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202")]
public static event EventHandler LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202")]
public static event EventHandler? LowMemory;
[System.ComponentModel.Browsable(false)]
[System.Obsolete("The LowMemory event has been deprecated and is not supported.")]
public static event EventHandler? LowMemory;
public static event EventHandler LowMemory;
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("This event has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.LowMemory : EventHandler 
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("This event has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.LowMemory : EventHandler 
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("The LowMemory event has been deprecated and is not supported.")>]
member this.LowMemory : EventHandler 
member this.LowMemory : EventHandler 
Public Shared Custom Event LowMemory As EventHandler 

事件類型

屬性

例外狀況

目前內容不支援系統事件告知。 例如,伺服器處理序可能就不支援全域系統事件告知。

建立系統事件視窗執行緒的嘗試未成功。

備註

此事件會包裝WM_COMPACTING訊息。 當系統偵測到超過 30 到 60 秒間隔的系統時間超過 12.5% 時,此訊息會傳送至所有最上層視窗。 這表示系統記憶體不足。

注意

只有在訊息幫浦正在執行時,才會引發此事件。 在 Windows 服務中,除非使用隱藏表單或訊息幫浦已手動啟動,否則不會引發此事件。 如需示範如何在 Windows 服務中使用隱藏表單來處理系統事件的程式碼範例,請參閱 類別 SystemEvents

警告

因為這是靜態事件,所以當您處置應用程式時,您必須卸離事件處理程式,否則記憶體流失將會導致。

給呼叫者的注意事項

此訊息僅適用於與16位 Windows 型應用程式的相容性。

適用於