Displays a bubble ToolTip at the specified location.
The following examples show how to display and hide a bubble ToolTip. Click a link to jump to the example in that programming language.
C#
//--------------------------------------------
// Preconditions: SolidWorks is running.
// Postconditions:
// (1) Bubble ToolTip is shown.
// (2) Bubble ToolTip is hidden.
//--------------------------------------------
using
SolidWorks.Interop.sldworks;
using
SolidWorks.Interop.swconst;
using
System;
namespace
ShowBubbleToolTipAt2SldWorksCSharp.csproj
{
public partial class SolidWorksMacro
{
public void Main()
{
// Show bubble ToolTip
swApp.ShowBubbleTooltipAt2(300, 400, (
int)swArrowPosition.swArrowLeftTop, "Sample Bubble Tooltip", "Message of Sample Bubble ToolTip", (int)swBitMaps.swBitMapUserDefined, "C:\\Program Files\\SolidWorks Corp\\SolidWorks\\data\\user macro icons\\questionmark.bmp", "", 0, (int)swLinkString.swLinkStringNone, "", "");
}
// 1. Insert a breakpoint at the next command so execution of macro stops
// 2. Examine the SolidWorks graphics area to see the bubble Tooltip
// 3. Toggle the breakpoint to hide the bubble Tooltip
swApp.HideBubbleTooltip();
/// <summary>
/// The SldWorks swApp variable is pre-assigned for you.
/// </summary>
public SldWorks swApp;
}
}
VB.NET
'--------------------------------------------
' Preconditions: SolidWorks is running.
' Postconditions:
' (1) Bubble ToolTip is shown.
' (2) Bubble ToolTip is hidden.
'--------------------------------------------
Imports
SolidWorks.Interop.sldworks
Imports
SolidWorks.Interop.swconst
Imports
System
Partial Class SolidWorksMacro
Public Sub main()
' Show bubble ToolTip
swApp.ShowBubbleTooltipAt2(300, 400, swArrowPosition.swArrowLeftTop, "Sample Bubble Tooltip", "Message of Sample Bubble ToolTip", swBitMaps.swBitMapUserDefined, "C:\Program Files\SolidWorks Corp\SolidWorks\data\user macro icons\questionmark.bmp", "", 0, swLinkString.swLinkStringNone, "", "")
Stop
swApp.HideBubbleTooltip()
End Sub
''' <summary>
''' The SldWorks swApp variable is pre-assigned for you.
''' </summary>
Public swApp As SldWorks
End Class
VBA
'--------------------------------------------
' Preconditions: SolidWorks is running
'
' Postconditions:
' (1) Bubble ToolTip is shown.
' (2) Bubble ToolTip is hidden.
'--------------------------------------------
Option Explicit
Sub main()
Dim swApp As SldWorks.SldWorks
Set swApp = Application.SldWorks
' Show Bubble ToolTip
swApp.ShowBubbleTooltipAt2 300, 400, swArrowLeftTop, "Sample Bubble Tooltip", "Message of Sample Bubble ToolTip", swBitMapUserDefined, "C:\Program Files\SolidWorks Corp\SolidWorks\data\user macro icons\questionmark.bmp", "", 0, swLinkStringNone, "", ""
Stop
swApp.HideBubbleTooltip
End Sub
'--------------------------------------------