本文整理汇总了C#中System.Windows.Forms.ToolTip.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# ToolTip.Dispose方法的具体用法?C# ToolTip.Dispose怎么用?C# ToolTip.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ToolTip
的用法示例。
在下文中一共展示了ToolTip.Dispose方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SplitContainerTools
/// <summary>Initializes a new instance of the <see cref="SplitContainerTools"/> class.</summary>
/// <param name="container">
/// The <see cref="System.Windows.Forms.SplitContainer"/> to which this instance will be bound.
/// </param>
public SplitContainerTools(SplitContainer container)
{
split = container;
_keepFocus = false;
_showGripper = true;
_showButtons = SplitContainerButtons.None;
_panel1Border = false;
_panel2Border = false;
_buttons = new SplitContainerButton[] { };
_tooltip = new ToolTip();
_splitRectInternal = typeof(SplitContainer).GetField("splitterRect", Reflection.BindingFlags.NonPublic |
Reflection.BindingFlags.GetField |
Reflection.BindingFlags.Instance);
split.Paint += split_Paint;
split.MouseDown += split_MouseDown;
split.MouseUp += split_MouseUp;
split.MouseClick += split_MouseClick;
split.MouseMove += split_MouseMove;
split.MouseLeave += (o, e) => split.Cursor = Cursors.Default;
split.SplitterMoved += split_SplitterMoved;
split.SizeChanged += split_Resize;
split.Disposed += (o, e) => _tooltip.Dispose();
((Panel)split.Panel1).ClientSizeChanged += Split_Panel_CollapsedChanged;
((Panel)split.Panel2).LocationChanged += Split_Panel_CollapsedChanged;
}
示例2: createTooltip
public void createTooltip(ToolTip toolTip)
{
if (toolTip != null)
{
toolTip.Dispose();
}
toolTip = new ToolTip();
toolTip.AutoPopDelay = 3000;
toolTip.InitialDelay = 1;
toolTip.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip.ShowAlways = true;
toolTip.SetToolTip(this.groupBox2, "你选择的是" + this.requestType_cb.Text + "方式");
}
示例3: SystrayRemove
internal override void SystrayRemove(IntPtr handle, ref ToolTip tt)
{
SetVisible (handle, false, false);
// The caller can now re-dock it later...
if (tt != null) {
tt.Dispose();
tt = null;
}
// Close any balloon window *we* fired.
ThemeEngine.Current.HideBalloonWindow (handle);
}
示例4: SystrayRemove
public void SystrayRemove(IntPtr handle, ref ToolTip tt)
{
#if GTKSOCKET_SUPPORTS_REPARENTING
X11Hwnd hwnd;
hwnd = (X11Hwnd)Hwnd.ObjectFromHandle(handle);
/* in the XEMBED spec, it mentions 3 ways for a client window to break the protocol with the embedder.
* 1. The embedder can unmap the window and reparent to the root window (we should probably handle this...)
* 2. The client can reparent its window out of the embedder window.
* 3. The client can destroy its window.
*
* this call to SetParent is case 2, but in
* the spec it also mentions that gtk doesn't
* support this at present. Looking at HEAD
* gtksocket-x11.c jives with this statement.
*
* so we can't reparent. we have to destroy.
*/
SetParent(hwnd.WholeWindow, FosterParent);
#else
Control control = Control.FromHandle(handle);
if (control is NotifyIcon.NotifyIconWindow)
((NotifyIcon.NotifyIconWindow)control).InternalRecreateHandle ();
#endif
// The caller can now re-dock it later...
if (tt != null) {
tt.Dispose();
tt = null;
}
}
示例5: SystrayRemove
internal override void SystrayRemove (IntPtr handle, ref ToolTip tt)
{
Hwnd hwnd;
hwnd = Hwnd.ObjectFromHandle (handle);
XUnmapWindow (DisplayHandle, hwnd.whole_window);
SetParent (hwnd.whole_window, FosterParent);
// The caller can now re-dock it later...
if (tt != null) {
tt.Dispose ();
tt = null;
}
}
示例6: SystrayRemove
internal override void SystrayRemove(IntPtr handle, ref ToolTip tt) {
SetVisible (handle, false, false);
// The caller can now re-dock it later...
if (tt != null) {
tt.Dispose();
tt = null;
}
}