Solved

KeyEventArgs for Alt + Number

Posted on 2013-06-19
8
320 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
 
LVL 1

Author Comment

by:emi_sastra
ID: 39261669
Hi Giannis,

It works.

Waiting for Deepak solution if any.

Thank you.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make a border less form movable 2 23
Help with WinAPI Signatures in VB.NET for SetWindowSubclass 2 35
C# Single Form 8 29
Exit the loop 4 39
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

864 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now