ToolTip.Hide(IWin32Window) 方法

定義

隱藏指定的工具提示視窗。Hides the specified ToolTip window.

public:
 void Hide(System::Windows::Forms::IWin32Window ^ win);
public void Hide (System.Windows.Forms.IWin32Window win);
member this.Hide : System.Windows.Forms.IWin32Window -> unit
Public Sub Hide (win As IWin32Window)

參數

win
IWin32Window

關聯之視窗或控制項的 IWin32Window,而且工具提示與其相關聯。The IWin32Window of the associated window or control that the ToolTip is associated with.

例外狀況

winnullwin is null.

備註

Hide如果目前正在顯示,方法會隱藏指定的工具提示 ControlThe Hide method hides the ToolTip for the specified Control if it is currently being displayed. 它不會停用或防止在未來顯示相同的工具提示。It does not disable or otherwise prevent the same ToolTip from being displayed in the future. 若要改為停用所有與目前元件相關聯的工具提示視窗 ToolTipTitle ,請將 Active 屬性設定為 falseTo instead disable all ToolTip windows associated with the current ToolTipTitle component, set the Active property to false.

在部分信任中執行的應用程式必須判斷 AllWindows 提示許可權,才能使用這個方法,因為 Hide 可以隱藏與使用者動作無關的提示。Applications running in partial trust must assert the AllWindows permission to use this method, as Hide can hide the tip independent of user action.

適用於

另請參閱