Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

KeyEventArgs for Alt + Number

Posted on 2013-06-19
8
327 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get Client IP on RDS - VB.NET 15 67
Help with adding DLL file in Windows project 20 40
Complex SQL statement in VB.NET 7 31
Vb.net threads keep increasing 2 35
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 …
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…

809 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