Sumit Rai
Sumit Rai

Reputation: 65

Visual Studio 2012, virtual keypress combination

I am a newbie in Visual studio, I don't know how to press keyboard keys virtually.

    If (text1.Text = 1) Then
        'code for CTRL+DOWN
    End If
    If (text1.Text = 2) Then
        'code for CTRL+UP
    End If

I have no idea how to press keys virtually, Please help

Upvotes: 0

Views: 190

Answers (1)

OneFineDay
OneFineDay

Reputation: 9024

I like to use Windows Input Simulator. You can make combinations with this library.

InputSimulator.SimulateModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_C)

Upvotes: 1

Related Questions