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.
LVL 1
emi_sastraAsked:
Who is Participating?
 
Ioannis ParaskevopoulosConnect With a Mentor Commented:
Hi,

Have you tried
Keys.Alt+Keys.NumPad1

Open in new window


Giannis
0
 
Deepak LakkadCommented:
Hi,

Can you explain the problem properly?

- Deepak Lakkad
0
 
emi_sastraAuthor Commented:
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.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
emi_sastraAuthor Commented:
Hi Giannis,

It works.

Waiting for Deepak solution if any.

Thank you.
0
 
Deepak LakkadCommented:
no idea
0
 
emi_sastraAuthor Commented:
Ok.

Thank you.
0
 
emi_sastraAuthor Commented:
Hi Giannis,

It works.

Thank you very much for your help.
0
 
Ioannis ParaskevopoulosCommented:
Glad to help...

Giannis
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.