Solved

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

Posted on 2006-11-30
2
294 Views
Last Modified: 2008-02-01

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
Comment
Question by:DeniseGoodheart
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 18048378
Try...

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SendKeys.Send("%")
    End Sub
0
 

Author Comment

by:DeniseGoodheart
ID: 18048720
Many thanks Idel Mind for your help.

Cheers,
Denise
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

12 Experts available now in Live!

Get 1:1 Help Now