473,396 Members | 2,092 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,396 software developers and data experts.

VB2005 Sendkeys With Hotkey

I have this Code:

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
On Error Resume Next
If GetAsyncKeyState(System.Windows.Forms.Keys.F3) Then
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
End If
End Sub

And i have 1 Textbox and one Timer, It doesnt Send the Letters in the textbox when i click F3.
Halp please :)
Nov 7 '07 #1
2 1881
Shashi Sadasivan
1,435 Expert 1GB
I have this Code:

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
On Error Resume Next
If GetAsyncKeyState(System.Windows.Forms.Keys.F3) Then
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
End If
End Sub

And i have 1 Textbox and one Timer, It doesnt Send the Letters in the textbox when i click F3.
Halp please :)
You might want to make sure that the control is focused at the time when send keys is being called.
Nov 7 '07 #2
You might want to make sure that the control is focused at the time when send keys is being called.

It is, Still doesnt work :(
Nov 7 '07 #3

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

Similar topics

2
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...
5
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.. ...
1
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...
5
by: alfred.sehmueller | last post by:
Hello, i built a small system-tray application that listens to a hotkey builds a string and inserts the string to the active application using SendKeys.Send() The Problem is - this works only...
3
by: Rsrany | last post by:
I've been working on a few gtk applications and need to tie a hot key catcher into a thread. I am currently finding threaded user32.GetMessageA do not work. I have included two programs: 1) a...
1
by: Rune Jacobsen | last post by:
Hi all, I have some often-performed tasks in my applications that I want users to be able to specify hotkeys for. However, I don't want to hard code these hotkeys, as sooner or later some other...
92
by: =?Utf-8?B?bW9iaWxlbW9iaWxl?= | last post by:
I'm trying to load this structure for a call to DeviceIoControl: typedef struct _NDISUIO_QUERY_OID { NDIS_OID Oid; PTCHAR ptcDeviceName; UCHAR Data; } NDISUIO_QUERY_OID, *PNDISUIO_QUERY_OID; ...
2
by: Evolution445 | last post by:
In my previous topic ( http://www.thescripts.com/forum/thread678765.html ) I thought I finally had the code to work, and it did work, till I added a few other lines of code and then it stopped...
5
by: Evolution445 | last post by:
Hi all, I got a problem with my code to check a game's chat position and write text to the game when a command is written by someone on the chat. I haven't figured out yet how to make it send keys...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.