Solved

KeyEventArgs for Alt + Number

Posted on 2013-06-19
8
323 Views
Last Modified: 2013-06-20
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.
0
Comment
Question by:emi_sastra
  • 4
  • 2
  • 2
8 Comments
 
LVL 11

Expert Comment

by:Deepak Lakkad
ID: 39261559
Hi,

Can you explain the problem properly?

- Deepak Lakkad
0
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 500 total points
ID: 39261561
Hi,

Have you tried
Keys.Alt+Keys.NumPad1

Open in new window


Giannis
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39261668
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 1

Author Comment

by:emi_sastra
ID: 39261669
Hi Giannis,

It works.

Waiting for Deepak solution if any.

Thank you.
0
 
LVL 11

Expert Comment

by:Deepak Lakkad
ID: 39261801
no idea
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39261891
Ok.

Thank you.
0
 
LVL 1

Author Closing Comment

by:emi_sastra
ID: 39261896
Hi Giannis,

It works.

Thank you very much for your help.
0
 
LVL 23

Expert Comment

by:Ioannis Paraskevopoulos
ID: 39261926
Glad to help...

Giannis
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question