Link to home
Start Free TrialLog in
Avatar of emi_sastra
emi_sastra

asked on

KeyEventArgs for Alt + Number

Private Sub Button_Click(sender As Object, e As EventArgs) Handles _
                btnEDCKartuKredit.Click, _
                btnEDCKartuDebit.Click, _
                btnCancel.Click, _
                btnSave.Click

        Dim dictionary As New Dictionary(Of CButtonLib.CButton, Short)
       dictionary.Add(btnEDCKartuKredit, ? )  ? Alt+1
       dictionary.Add(btnEDCKartuDebit,  ? )  ? Alt + 2
        dictionary.Add(btnCancel, Keys.Escape)
        dictionary.Add(btnSave, Keys.F9)

        Dim btn As CButtonLib.CButton = DirectCast(sender, CButtonLib.CButton)

        Dim keyEventArgs = New KeyEventArgs(dictionary(btn))

        Check_Keys(btn, keyEventArgs)

    End Sub

How to I code for Alt+1 and 2 ?

Thank you.
Avatar of Deepak Lakkad
Deepak Lakkad
Flag of India image

Hi,

Can you explain the problem properly?

- Deepak Lakkad
ASKER CERTIFIED SOLUTION
Avatar of Ioannis Paraskevopoulos
Ioannis Paraskevopoulos
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emi_sastra
emi_sastra

ASKER

Hi Deepak ,

I have button associated with Keys (F, Alt, Ctrl and Shift).

I have function to check those keys, and I want to reuse that function for button key.

Thank you.
Hi Giannis,

It works.

Waiting for Deepak solution if any.

Thank you.
no idea
Ok.

Thank you.
Hi Giannis,

It works.

Thank you very much for your help.
Glad to help...

Giannis