NativeWindow.DestroyHandle 方法

定義

終結視窗和它的控制代碼。

public:
 virtual void DestroyHandle();
public virtual void DestroyHandle ();
abstract member DestroyHandle : unit -> unit
override this.DestroyHandle : unit -> unit
Public Overridable Sub DestroyHandle ()

備註

這個方法會終結與 相關聯的 Handle 視窗,並將 Handle 屬性設定為 0,並呼叫 OnHandleChange 方法來反映變更。 一般而言,只有在使用原生視窗完成時,才會呼叫 DestroyHandle

注意

類別 NativeWindow 會自動終結相關聯的視窗,並釋放其資源,以回應WM_DESTROY訊息。

適用於

另請參閱