473,659 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.Net SendKeys

2 New Member
I am trying to send:

Ctrl, Shift, TAB and the number 1 contemporaneous ly.

I am using:

System.Windows. Forms.SendKeys. Send("^+{TAB}1" )

or

System.Windows. Forms.SendKeys. Send("^+({TAB}1 )")

Neither work. Any clues?

Thanks in advance.

Robert
May 4 '07 #1
4 49229
Killer42
8,435 Recognized Expert Expert
What does "contemporaneou sly" mean in this context?

According to the doco, your first version should successfully send the Ctrl-Shift-Tab first, followed by "1". Perhaps you need to use SendWait?
May 5 '07 #2
Robert Cezar
2 New Member
Sorry...

I am trying to send:

Ctrl, Shift, TAB and the number 1 all at the same time.

i.e., Hold down all 4 keys simultaneously.

I have tried:

System.Windows. Forms.SendKeys. Send("(^+{TAB}1 )")
System.Windows. Forms.SendKeys. Send("^+({TAB}1 )")
System.Windows. Forms.SendKeys. Send("(^+)({TAB }1)")

Nothing seems to work.

Thanks for the reply.

Robert
May 5 '07 #3
SammyB
807 Recognized Expert Contributor
Sorry...

I am trying to send:

Ctrl, Shift, TAB and the number 1 all at the same time.

i.e., Hold down all 4 keys simultaneously.
You cannot do that: it is two key strokes. ^+{TAB} ctrl shift tab is one key stroke and 1 is the second key stroke, so "^+{TAB}" & "1" would be the way I would try.

Are you trying to do this: http://www.thescripts.com/forum/thread206970.html?
May 5 '07 #4
SammyB
807 Recognized Expert Contributor
You cannot do that
Look at http://msdn2.microsoft.com/en-us/lib...orms.keys.aspx
Notice that some of the enums are listed as "modifier" keys: you can bitwise combine these, so Keys.Control + Keys.Shift + Keys.Tab is a single key, but there is no Tab modifier key.
May 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
460
by: Mr. Bungle | last post by:
I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results) Private Sub Command6_Click() ReturnValue = Shell("Outlook.EXE", 1) ' Run Outlook SendKeys "%(F)", True SendKeys "W", True SendKeys "M", True 'Open New Message SendKeys "randomemail@harbornet.com", True '<-- Email Address
2
5693
by: RBohannon | last post by:
I need to create a report in MS Word populated with data from A2K. I have been asked to create the report in Word so that parts of it can be edited as necessary later. The data in the report are in a table with headings for each column, so converting an Access report to a Word doc in RTF doesn't work because only the text is converted, not the table. What I have tried so far, with some success, is to write the report directly in Word....
1
9536
by: George | last post by:
Every time I used the Sendkeys command in my application the "Numlock" turned off and I couldn't use the keypad to hit numbers...... The old code was: Private Sub Command1_Click() SendKeys "{DOWN}" SendKeys "^{END}" SendKeys "{TAB}" End Sub
5
8751
by: Wayne Gibson | last post by:
Hi, Was wondering if somebody could help.. I'm trying to use Sendkeys on a Windows forms. I have entered the following command to simulate a CTRL+ALT+1.. System.WindowsForms.SendKeys.Send("^%1"); This didn't work, so I then tried..
1
7715
by: Bryan | last post by:
I am writing a C# Windows App that updates out Excel reports' modules. The app is complete, but has a problem. The only way MS allows you to unprotect the VBA code in Excel is to do it by hand or sendkeys. I hate using SendKeys, but I am forced to use them. Anyway, I have written a function that will unprotect the VBA code in the current work book. It works about 60% of the time. For some reason it gets out of sync and the SendKeys don't...
1
27243
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 a Winforms C# application. I have tried a number of code segment combinations for ALT T combination without success. The combinations might be correct but it might be failing for some other reason. My Attempts:
6
31060
by: Gary | last post by:
Hi, I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)") This is not working ..what could be the reason..?
6
3316
by: Michael Maes | last post by:
Hello, I'm invoking successive SendKeys.SendWait("{BACKSPACE}") SendKeys.SendWait("{DELETE}") in a loop. The issue is that it causes a Beep on every Pass. Setting the 'Handled = True' on the Control does prevent the Beep, but
2
3509
by: MLH | last post by:
I have the following code with a SendKeys statement in it. 100 If Me.Dirty Then MsgBox "Form is Dirty!" 120 Dim MyQ As String, MyTitle As String, Response As Boolean 140 MyQ = "You started to enter something. Are you sure you want to quit without saving?" 180 MyTitle = "Continue? - " & MyApp$ & ", rev. " & MY_VERSION$ 240 Response = AskUserQ(MyQ, MyTitle, vbQuestion, vbDefaultButton1)
0
2758
by: dtshedd | last post by:
I have a database with hundreds of embedded photos (Microsoft Photo 3.0) Many are larger than 1 MB. I tried Stephen Lebans macro but it did not work probably for the aforementioned reasons Now I am trying to use the copy portion of Stephens macro and then open MS Paint using Sendkeys to Paste and save. The Sendkeys method is opening the Paint app but not executing the paste command. Wondering what I am doing wrong. I have only ever...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.