• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

System.Windows.Forms.SendKeys to Perform Alt Key Press When The Form Loads


Hi,

I’m using VS.NET 2005.  I’m trying to use the System.Windows.Forms.SendKeys to perform the Alt key press when the form loads.  The reason I need to do this is because I’m using Short Cut Keys/Hot Keys on my command buttons, and they do not display the Hot Keys unless the Alt key is pressed.  The following code does not work:


        System.Windows.Forms.SendKeys.Send("Alt")



Thanks,
Denise
0
DeniseGoodheart
Asked:
DeniseGoodheart
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Try...

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SendKeys.Send("%")
    End Sub
0
 
DeniseGoodheartAuthor Commented:
Many thanks Idel Mind for your help.

Cheers,
Denise
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.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now