Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 24th, 2005, 03:36 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default KeyPress event

I want to do something when the user presses any key on the Form. I have tried putting code in the Keypress and KeyDown events however the code never executes. Am I missing something?

Thanks,

Jim
  #2 (permalink)  
Old March 24th, 2005, 04:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

For the form, try setting the keypreview value to false (I believe?, its the opposite of the default value), and try your code then.

Brian


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i assign keypress event on F2 kau_shuk VS.NET 2002/2003 1 August 25th, 2006 08:49 PM
keypress event kau_shuk VB.NET 2002/2003 Basics 1 July 31st, 2006 11:21 AM
how can use keypress event in a web application? agnihotrived .NET Framework 2.0 2 April 24th, 2005 09:14 PM
Keypress Event bharatsaboo VB.NET 2002/2003 Basics 0 February 25th, 2005 03:34 AM
KeyPress Event in VB different from VBA PaulG Beginning VB 6 3 February 3rd, 2004 01:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.