TouchToolKit for WinForms | ComponentOne
Magnify Component / Magnify Events / Posting a Message when the Magnifier is Closed
In This Topic
    Posting a Message when the Magnifier is Closed
    In This Topic

    Posting Message when the Maginfier Window is Closed

    You can use the C1Magnify.MessageWhenClose property to post a message to the attached control when the Magnifier Window is closed. The Default value is None.

    The C1Magnify.Close event is available to implement a custom action.

    The following code shows the ContextMenu of the TextBox when the Magnifier Window is closed.

    Visual Basic
    Copy Code

    Imports C1.Win.TouchToolKit

     

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        TextBox1.Text = "Hello"

        C1Magnify1.SetEnableMagnifier(TextBox1, True)

        C1Magnify1.MessageWhenClose = MessageWhenClose.RightClick

    End Sub

    C#
    Copy Code

    using C1.Win.TouchToolKit;

     

    private void Form1_Load(object sender, EventArgs e)

    {

        textBox1.Text = "Hello";

        C1Magnify1.SetEnableMagnifier(textBox1, true);

        C1Magnify1.MessageWhenClose = MessageWhenClose.RightClick;

    }