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

how to simulate key being pressed

I have a form with a textbox and a button. If I press
the button, I want to type the letter q into the
textbox. What would I put into the event handler of the
button in order to simulate the q key being pressed?
Thank you for your reply.

Mike
Nov 15 '05 #1
1 1818
Look at the SendKeys method.
-mike
MVP

"Mike" <mi*******@hotmail.com> wrote in message
news:09****************************@phx.gbl...
I have a form with a textbox and a button. If I press
the button, I want to type the letter q into the
textbox. What would I put into the event handler of the
button in order to simulate the q key being pressed?
Thank you for your reply.

Mike

Nov 15 '05 #2

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

Similar topics

0
by: DL | last post by:
Hi, I have an app. that opens pdf documents. Now i would like to use the text selectiontool of the pdf interface to select text and then when a user presses a button it should automatically copy...
9
by: seguso | last post by:
Hello, For the sake of efficiency, I have chosen C++ as the language for a "Free Adventure Construction Kit" I am developing (http://fack.sf.net). I am looking for a way to simulate list...
10
by: JustSomeGuy | last post by:
I need to log into a web page automatically. The web page has a password text field and a login button. (A form?) How do I simulate that a user logged in and entered the password and pressed...
61
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step...
4
by: johnny | last post by:
On a form I would like to simulate a button click when the Enter is pressed. My form is setup and it works if the delegate for the key pressed on the form calls the delegate for the button pressed....
3
by: Dan | last post by:
Consider a simple form with a textbox and button. Is there a way to handle the common situation where a user presses "return" rather than clicks on the button. I can already detect the...
1
by: diegocarpintero | last post by:
I am writing a c# class which main purpose is to simulate the dialog with a GUI-application. The idea is that this class can simulate some user actions like mouse clicks on buttons. I have...
3
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, in my code-behind windows project (vs2005) i was wondering if you can simulate the pressing of key combinations (i.e. Alt + S)? thanks, rodchar
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
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
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
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.