473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How can I send the ALT+A keystroke to a Window?

Hi Gang,
I would like to send the Alt+A keystroke to a Window. What's the best way
to go about that? This didn't seem to work. What message should I work
with WM_KEYDOWN and WM_KEYUP are specifically for keys that are pressed
without ALT being used.

SendMessage(intIE_Window, WM_HOTKEY, VK_A, MOD_ALT)
Thanks in Advance for any and All help,
Christian Blackburn
Nov 20 '05 #1
2 3870
How about using SendKeys instead?

' Send Ctrl S to open the Save As dialog box.
SendKeys.SendWait("^S")

January

"Christian Blackburn" <Christian_Blackburn@Damn@Sp**@Hotmail.com> wrote in
message news:ea**************@TK2MSFTNGP10.phx.gbl...
Hi Gang,
I would like to send the Alt+A keystroke to a Window. What's the best way
to go about that? This didn't seem to work. What message should I work
with WM_KEYDOWN and WM_KEYUP are specifically for keys that are pressed
without ALT being used.

SendMessage(intIE_Window, WM_HOTKEY, VK_A, MOD_ALT)
Thanks in Advance for any and All help,
Christian Blackburn

Nov 20 '05 #2
Hi January,
SendKeys is extremely unreliable, because it only works when the window in
question has focus. I want to know the message that the window receives
when ALT+A is sent so I can replicate it :).
Thanks though,
Christian

"January Smith" <ja*****@texas.net> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
How about using SendKeys instead?

' Send Ctrl S to open the Save As dialog box.
SendKeys.SendWait("^S")

January

"Christian Blackburn" <Christian_Blackburn@Damn@Sp**@Hotmail.com> wrote in
message news:ea**************@TK2MSFTNGP10.phx.gbl...
Hi Gang,
I would like to send the Alt+A keystroke to a Window. What's the best way to go about that? This didn't seem to work. What message should I work
with WM_KEYDOWN and WM_KEYUP are specifically for keys that are pressed
without ALT being used.

SendMessage(intIE_Window, WM_HOTKEY, VK_A, MOD_ALT)
Thanks in Advance for any and All help,
Christian Blackburn


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dale | last post by:
I'm using the NotifyIcon component on a form within a Windows application that will normally show no interface. NotifyIcon does add an icon as required to the notification area of the Task Bar. ...
0
by: CLarkou | last post by:
My program in Access (Office 97/2000/XP/2003) opens a database (MAIN MENU) with a listing of all databases in a directory. User selects what database wants to open, and program opens it. I am not...
1
by: GrantS | last post by:
I need to use a sendkeys key combination to automate the "accept files" that a remote user wants to send to me via Windows messenger. I am using automation to work with Windows Messenger client in...
6
by: Christian Blackburn | last post by:
Hi Gang, I am trying to accomplish something that should be terribly simple. I just want to send ALT+A to another window. What SendMessage Parameters should I send? Thanks, Christian Blackburn
1
by: Max | last post by:
Hi, I am trying to paste text in a console window using SendKeys and the Clipboard (I am using Windows XP SP2 and .NET 1.1). Here is the code (I have a form with two edit boxes, DosTitle in...
5
by: Dan | last post by:
Hi, Is there a way to send information via javascript by redirecting to a page that contains frames? The information that will have to be sent will be the page name of the original page before...
3
by: =?Utf-8?B?QmVybmFyZG8gU2FsYXphciBuZXdi?= | last post by:
Hi everybody... i need help with this issue: i have a textbox control with the focus. at side, i have a datagridview control populated with some data. i need to control behavior of dgv control...
4
by: =?Utf-8?B?QWxleGFuZGVy?= | last post by:
Hi! I am new to C#. I read two C# books in the last two days which only covered the basics. And now I am on my third day. The books were really bad, because they did not cover windows applications,...
1
by: Stefan Reinmers | last post by:
Hi there, how can i send keystrokes (with vb.net ! )when i not wanna use sendkeys ? i have tryed Private Declare Sub keybd_event Lib "user32" Alias "keybd_event" ( _ ByVal bVk As Byte, _ ByVal...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.