none
Power Point wireless presenter input for vb.net form RRS feed

  • Question

  • I need to use power point wireless presenter to click my form button. So far I tested presenter keys are working same as like keyboard arrow keys. But if I use the below key binding program its not working.

    Public Class Form1
    
    
        Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
            'detect up arrow key
            If keyData = Keys.Up Then
                Me.Button2.PerformClick()
                Return True
            End If
            Return MyBase.ProcessCmdKey(msg, keyData)
        End Function
    
        Public Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
            MsgBox("Proceed Button Clicked")
        End Sub
    
    End Class

    Kindly Help with this.

    Thanks

      
    Monday, April 23, 2018 2:21 AM

All replies

  • Is your form focused (active) when you press the key?

    Monday, April 23, 2018 4:55 AM
  • Well you've had several threads about this issue. How do you believe a Form would receive a keydown or keyup event if you were using some wireless device with PowerPoint?

    La vida loca

    Monday, April 23, 2018 8:27 PM
  • Hi,

    I have found a method to interact with your application via wireless Presenter. With this method, desktop application isn't depended on any focused button.

    Protected

    OverridesFunctionProcessCmdKey(ByRefmsg AsMessage, ByValkeyData AsKeys) AsBoolean

          

    IfkeyData = Keys.PageDown Then

              

    "Call your function here"

          

    ElseIfkeyData = Keys.PageUp Then

            

    "Call your function here"         

    ReturnTrue    

    EndIf       

    ReturnMyBase.ProcessCmdKey(msg, keyData)   

    EndFunction

     
    Wednesday, April 3, 2019 5:56 AM