Solved

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

Posted on 2006-11-30
2
296 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

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
SLMGR Switches Are Not Working On KMS Host 3 69
Round a string to two digits 12 32
Help with LINQ and XML 10 27
Need a starter for ETL protocol? 4 42
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

920 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

18 Experts available now in Live!

Get 1:1 Help Now