473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Command on the press of a key?

Can i carry out a command during execution with the press of a key?

Am working on a Countdown Timer and everytime i press p on the keyboard, i
want to add a minute to the timer and every time i press m, i want to deduct
a minute from it.

Any suggestion would be much appreciated.

Thanks in advance,
Brian
Jul 17 '05 #1
1 2954
Set keypreview to true on the form and watch for the desired keystrokes.

"Brian Basquille" <tb********@eir com.netSPAM> wrote:
Can i carry out a command during execution with the press of a key?

Am working on a Countdown Timer and everytime i press p on the keyboard, i
want to add a minute to the timer and every time i press m, i want to deduct
a minute from it.

Any suggestion would be much appreciated.

Thanks in advance,
Brian


More about me: http://thelabwiz.home.mindspring.com/
VB3 source code: http://thelabwiz.home.mindspring.com/vbsource.html
VB6 source code: http://thelabwiz.home.mindspring.com/vb6source.html
VB6 - MySQL how to: http://thelabwiz.home.mindspring.com/mysql.html
My newest language - NSBasic for the Palm PDA: http://thelabwiz.home.mindspring.com/nsbsource.html
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
johnecarter atat mindspring dotdot com. Fix the obvious to reply by email.
Jul 17 '05 #2

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

Similar topics

1
1912
by: John Svercek | last post by:
On an aspx page, I notice when the page opens there is no default command button (press enter & nothing happens). However, once I set the focus on a text field one of the command buttons becomes the default (press enter & the command button is executed). How do I define which button should be the default and can I change it depending on the text box I am in? I am using VB .Net for development of a web service that presents the pages. --...
0
1286
by: Leo | last post by:
Does someone know if there is a setting in the python Unix world to make the command history behave as it does in the Windows intepreter? Specifically, I like the fact that the command history remembers which of a sequence of commands is the one that I last issued. For example, suppose that I typed the following lines into the interpreter: import foo for e in foo.container: print e
2
1344
by: Johm | last post by:
I need some help in finding a way to remove the filter from the previous command. I open the report from a form where i have option group called Office.Depending on the option in the option group,the record source in the report is filtered for this option. In the OnOpen event of the report i have : Public town As Long town = Forms!!
16
2548
by: MLH | last post by:
In Access 97 and Access 2.0 applications, if a command button has the focus, the spacebar will 'PRESS" the key. How does one go about disabling this annoying BEATURE?
1
10845
by: Ennio-Sr | last post by:
Hi all! I'm writing a script that presents the user with a numbered lines menu, each line corresponding to a <case n> which executes a psql command. As the psql-commands are very similar to each other (all of them have the structure: 1.- psql mydb -x -c "SELECT * FROM tb_nm WHERE col_nm LIKE '%$k_r%'" ) I thought it was possible to shorten it, initializing a str with said command at the beginning of the script and limiting the...
6
16988
by: Jwolf | last post by:
I have .net 2002 edu version and when it installed there was a shortcut to the .net command prompt. My CLR disk is scratched so I can't reinstall and so I just downloaded express. I dont know how to access the command prompt so I can compile basic files from this book I'm reading. I found this really cool resource here that would save me a lot of typing by being able to sense which directory I'm in...
16
2701
by: John Salerno | last post by:
Here's my new project: I want to write a little script that I can type at the terminal like this: $ scriptname package1 where scriptname is my module name and any subsequent arguments are the names of Linux packages to install. Running the script as above will create this line: sudo aptitude install package1 package2 ...
25
3623
by: Tim Zych | last post by:
Is there keystroke combination that will clear the command window in Visual Studio.Net? Or, is there a way for me to clear it in vb.net code, prior to my code running? Thanks.
9
3661
by: supun24 | last post by:
Hi All, I have created Command Array like follows. Public Class Form1 Dim NewButton(25) As Button Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim loc As Integer loc = 50 For i = 1 To 25
0
8310
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
8732
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
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
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
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.