///       object) in a program.
// setting TTM_TRACKPOSITION will cause redundant POP and Draw Messages..
// Hence we gaurd against this by having this private Flag..
///       Initializes a new instance of the  class, given the container.
///       Initializes a new instance of the  class in its default state.
///       Gets or sets a value indicating whether the  control is currently active.
///       the time (in milliseconds) that passes before the  appears.
///       Gets or sets the initial delay for the  control.
///       Gets or sets the BackColor for the  control.
///     The createParams to create the window.
///       Gets or sets the ForeColor for the  control.
///       Gets or sets the IsBalloon for the  control.
// refer VsWhidbey 498263: ToolTips should be shown only on active Windows.
// We want to enter in the IF block only if ShowParams does not return SW_SHOWNOACTIVATE.
// for ToolStripDropDown ShowParams returns SW_SHOWNOACTIVATE, in which case we DONT want to check IsWindowActive and hence return true.
/// Indicates whether the ToolTip will be drawn by the system or the user.
///       appears even when its parent control is not active.
///       When set to true, any ampersands in the Text property are not displayed.
///       Gets or sets an Icon on the ToolTip.
// If the title is null/empty, the icon won't display.
///       Gets or sets the title of the ToolTip.
///       When set to true, animations are used when tooltip is shown or hidden.
///       When set to true, a fade effect is used when tooltips are shown or hidden.
///    Fires in OwnerDraw mode when the tooltip needs to be drawn.
///    Fires when the tooltip is just about to be shown.
///     Adjusts the other delay values based on the Automatic value.
// Reset the toplevel control when the owner's handle is recreated.
//Wait for the Handle Creation..
/// Fires the Draw event.
/// Fires the Popup event.
///     Creates the handle for the control.
// If in ownerDraw mode, we don't want the default border.
//Call the Sendmessage thru a function..
///     Destroys the handle for this control.
/// Required by Label to destroy the handle for the toolTip added for AutoEllipses.
// when the toplevelControl is a form and is Modal, the Handle of the tooltip is releasedbefore we come here.
// In such a case the tool wont get deleted from the tooltip.
///     Returns the delayTime based on the NativeMethods.TTDT_* values.
///     for delete operations. NOTE: This cannot force the creation of a handle.
///     region. NOTE: This may force the creation of a handle.
///		to free the string buffer referenced by lpszText (using Marshal.FreeHGlobal).
//to the text in the parent window.
///       Retrieves the  text associated with the specified control.
///     handles special cases where one Control owns multiple HWNDs (i.e. ComboBox).
//Special case the ActiveX Controls.
//find the matching HWnd matching the ScreenCoord and find if the Control has a Tooltip.
// the top level control here we won't ever create the tooltip handle.
///     Sets the delayTime based on the NativeMethods.TTDT_* values.
// to preserve value in case of handle recreation.
///       Associates  text with the specified control.
///    Returns true if the AutomaticDelay property should be persisted.
///    Returns true if the AutoPopDelay property should be persisted.
///    Returns true if the InitialDelay property should be persisted.
///    Returns true if the ReshowDelay property should be persisted.
///       Associates  with the specified control and displays it.
///       and displays it for the specified duration.
///       Hides  with the specified control.
// VSWhidbey 562045: Only send message if we actually have a ToolTip at this point.
// VSWhidbey 562045 - clear off the toplevel control.
///     Generates updown events when the timer calls this function.
///       Returns a string representation for this control.
// re-adjust the Y position of the tool tip if it bleeds off the screen working area.
///     Handles the WM_MOVE message.
// Treeview handles its own ToolTips.
// Reposition would check the bounds for us.
///     Handles the WM_MOUSEACTIVATE message.
///     Handles the WM_WINDOWFROMPOINT message.
///     Handles the TTN_SHOW message.
// The dataGridView cancelled the tooltip.
// Set the max possible size of the tooltip to the size we received.
int maxwidth = (IsBalloon) ?
///     Handles the WM_WINDOWPOSCHANGED message.
///     tooltip : Hence we need to listen to the WindowPosChanged message can hide the window ourselves.
///     Refer to VsWhidbey : 490044 for more details.
///     Handles the WM_WINDOWPOSCHANGING message.
// Must reset the maxwidth to the screen size.
// them from the tip control.
// Font.FromHfont throws this exception, so fall back to the default control font.