Click here to Skip to main content
12,826,671 members (32,171 online)
Click here to Skip to main content


111 bookmarked
Posted 14 Sep 2003

Balloon Tips Galore!

, 14 Sep 2003
An article describing the various forms of Balloon Tips
Public Class Form2
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()

        'This call is required by the Windows Form Designer.

        'Add any initialization after the InitializeComponent() call
        ' load combo
        Dim names() As String = [Enum].GetNames(GetType(FMSMessageTip.BalloonAlignment))
        For Each name As String In names
        comboBox1.SelectedItem = names(0)

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
            End If
        End If
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents checkBox2 As System.Windows.Forms.CheckBox
    Friend WithEvents checkBox1 As System.Windows.Forms.CheckBox
    Friend WithEvents label1 As System.Windows.Forms.Label
    Friend WithEvents comboBox1 As System.Windows.Forms.ComboBox
    Friend WithEvents groupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents button1 As System.Windows.Forms.Button
    Friend m_mb As FMSMessageTip.MessageBalloon
    Friend WithEvents Button2 As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.checkBox2 = New System.Windows.Forms.CheckBox
        Me.checkBox1 = New System.Windows.Forms.CheckBox
        Me.label1 = New System.Windows.Forms.Label
        Me.comboBox1 = New System.Windows.Forms.ComboBox
        Me.groupBox1 = New System.Windows.Forms.GroupBox
        Me.button1 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.checkBox2.Location = New System.Drawing.Point(216, 80)
        Me.checkBox2.Name = "checkBox2"
        Me.checkBox2.TabIndex = 15
        Me.checkBox2.Text = "use abs posn"
        Me.checkBox1.Location = New System.Drawing.Point(216, 56)
        Me.checkBox1.Name = "checkBox1"
        Me.checkBox1.TabIndex = 14
        Me.checkBox1.Text = "center Stem"
        Me.label1.Location = New System.Drawing.Point(216, 8)
        Me.label1.Name = "label1"
        Me.label1.Size = New System.Drawing.Size(106, 16)
        Me.label1.TabIndex = 13
        Me.label1.Text = "Align:"
        Me.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.comboBox1.Location = New System.Drawing.Point(216, 24)
        Me.comboBox1.Name = "comboBox1"
        Me.comboBox1.Size = New System.Drawing.Size(106, 21)
        Me.comboBox1.TabIndex = 12
        Me.groupBox1.Location = New System.Drawing.Point(8, 8)
        Me.groupBox1.Name = "groupBox1"
        Me.groupBox1.Size = New System.Drawing.Size(180, 166)
        Me.groupBox1.TabIndex = 11
        Me.groupBox1.TabStop = False
        Me.groupBox1.Text = "groupBox1"
        Me.button1.Location = New System.Drawing.Point(216, 120)
        Me.button1.Name = "button1"
        Me.button1.Size = New System.Drawing.Size(112, 23)
        Me.button1.TabIndex = 10
        Me.button1.Text = "Show Tip"
        Me.Button2.Location = New System.Drawing.Point(216, 152)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(112, 23)
        Me.Button2.TabIndex = 16
        Me.Button2.Text = "Hide Tip"
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(336, 182)
        Me.Name = "Form2"
        Me.Text = "Form2"

    End Sub

#End Region

    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        m_mb = New FMSMessageTip.MessageBalloon
        m_mb.Parent = groupBox1
        m_mb.Title = "Traders corp. Inc"
        m_mb.TitleIcon = TooltipIcon.Info

        Dim ba As FMSMessageTip.BalloonAlignment
        ba = CType([Enum].Parse(GetType(FMSMessageTip.BalloonAlignment), comboBox1.Text), FMSMessageTip.BalloonAlignment)
        m_mb.Align = ba
        m_mb.CenterStem = checkBox1.Checked
        m_mb.UseAbsolutePositioning = checkBox2.Checked

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Ramesh Shrivastav
Web Developer
United States United States
Ramesh is very much into Microsoft technologies, and silently marvels at the power of Windows SDK.
He juggles his time between his family, work and his computer.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170326.1 | Last Updated 15 Sep 2003
Article Copyright 2003 by Ramesh Shrivastav
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid