Hide

SftButton/OCX 3.0 - Button Control

Display
Print

HoverOff Event, SftButton Object

The mouse cursor is moved outside the control.

Syntax

VB.NETPrivate Sub object_HoverOff(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.HoverOff
VBPrivate Sub object_HoverOff()
C#.NETvoid object_HoverOff(object sender, EventArgumentType e);
VC++void OnHoverOffobject();
CHRESULT OnHoverOffobject();

object

A SftButton object.

Comments

The HoverOff event occurs when the mouse cursor is moved outside the control.

The HoverStyle property defines how images respond to mouse cursor positions.

The HoverOn event occurs when the mouse cursor is moved into the control.

Examples

VB.NET

Private Sub AxSftButton1_HoverOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftButton1.HoverOn
    ' The cursor is over the button, change the font
    ' and button text
    AxSftButton1.Font = New Font(AxSftButton1.Font, FontStyle.Underline)
    AxSftButton1.Text = "Click Me, Please"
End Sub

Private Sub AxSftButton1_HoverOff(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftButton1.HoverOff
    ' The cursor has left the button, change the font
    ' and button text back to their original settings
    AxSftButton1.Font = New Font(AxSftButton1.Font, FontStyle.Regular)
    AxSftButton1.Text = "Click Me"
End Sub

Private Sub BorderTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BorderTimer.Tick
    ' Change the button border

VB6

Private Sub SftButton1_HoverOn()
    ' The cursor is over the button, change the font
    ' and button text
    SftButton1.Font.Underline = True
    SftButton1.Text = "Click Me, Please"
End Sub

Private Sub SftButton1_HoverOff()
    ' The cursor has left the button, change the font
    ' and button text back to their original settings
    SftButton1.Font.Underline = False
    SftButton1.Text = "Click Me"
End Sub

Private Sub PicTimer_Timer()
    ' Update the button bitmap every so often to get the

C#

private void axSftButton1_HoverOn(object sender, System.EventArgs e)
{
    // The cursor is over the button, change the font
    // and button text
    axSftButton1.Font = new Font(axSftButton1.Font, FontStyle.Underline);
    axSftButton1.Text = "Click Me, Please";
}

private void axSftButton1_HoverOff(object sender, System.EventArgs e)
{
    // The cursor has left the button, change the font
    // and button text back to their original settings
    axSftButton1.Font = new Font(axSftButton1.Font, FontStyle.Regular);
    axSftButton1.Text = "Click Me";
}

C++

    // The cursor is over the button, change the font
    // and button text
    IFontPtr pFont = m_vButton1->GetFont();
    pFont->put_Underline(TRUE);
    m_vButton1->Text = _bstr_t("Click Me, Please");

}

void CSpecialDlg::OnHoverOffSftbtn1()
{
    // The cursor has left the button, change the font
    // and button text back to their original settings
    IFontPtr pFont = m_vButton1->GetFont();
    pFont->put_Underline(FALSE);
    m_vButton1->Text = _bstr_t("Click Me");
}

See Also SftButton Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.