HeaderPane
Main
Hide
Share Link
Print

HoverOn Event, SftButton Object

The mouse cursor is moved into the control.

Syntax

C#void object_HoverOn(object sender, EventArgumentType e);
VB.NETPrivate Sub object_HoverOn(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.HoverOn
C++void OnHoverOnobject();
CHRESULT OnHoverOnobject();
VBPrivate Sub object_HoverOn()

object

A SftButton object.

Comments

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

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

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

Examples

C# View entire sample code

private void button1_Click(object sender, System.EventArgs e)
{
    Application.Exit();
}

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

VB.NET View entire sample code

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    ' Update the button bitmap every so often to get the
    ' spinning globe effect
    SetImage()
End Sub

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

C++ View entire sample code

    else if (nIDEvent == IDC_SFTBTN3)
        ChangeBorder();
    else if (nIDEvent == IDC_SFTBTN4)
        ToggleButton();

    CDialog::OnTimer(nIDEvent);
}

void CSpecialDlg::OnHoverOnSftbtn1()
{
    // 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");

VB6 View entire sample code

Option Explicit

Dim LastPicture As Integer

Private Sub CloseButton_Click()
    End
End Sub

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()

See Also SftButton Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.