Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
alegar010
posted

Private Sub UltraTextEditor1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
      Handles UltraTextEditor1.KeyDown

        If e.KeyData = Keys.Control + Keys.F2 Then
            MessageBox.Show("Se ha pulsado la combinación de teclas Control+F2")
            SendKeys.Send("{%}")
        End If
 End Sub


Hereby he returns to me the value "%" when I pulsate contrl F2 after accepting the MessageBox.

----------------------------------------------------------------

Private Sub UltraTextEditor1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
      Handles UltraTextEditor1.KeyDown

        If e.KeyData = Keys.Control + Keys.F2 Then
          
            SendKeys.Send("{%}")
        End If
 End Sub

 Hereby he does not return to me the value "%".

----------------------------------------------


Since it can return the value to me without the MessageBox?

Thank you

Parents
No Data
Reply
  • 560
    Verified Answer
    posted

    Private Sub UltraTextEditor1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles UltraTextEditor1.KeyDown
    If e.KeyData = Keys.Control + Keys.F2 Then


    e.Handled = True


    Me.UltraTextEditor1.SelectedText = "%"
    End If
    End Sub

    If that works. Thank you very much for the solution. Thank you

    ok ok ok :)

     

     

Children
No Data