logo
What's New
What's New
  Popular
Popular
  Top Rated
Top Rated
  Search
Search


Search :  

How to Add Link |   Modify Link   |   Login |     Register  |  Getting Rated |  Link to Us |  Feedback Us


Sponsors
FlashAdvisor.com
Web Directory
Custom Offshore Software Development
phpld Hacks
Software Download
Your Site Link




Categories
    3DS MAX
    ASP
    C And C++
    ColdFusion
    Database
    Dreamweaver
    Flash
    HTML
    Java
    JavaScript
    Linux
    Maya
    MS Excel
    MS PowerPoint
    MS Word
    Paint Shop Pro
    Perl and CGI
    Photoshop
    PHP
    Premiere
    Python
    Visual Basic
    Web Hosting
    XML
 

 

Key trapping
  

Home  » Visual Basic » Introduction to Visual Basic  

Key trapping How do you tell what keys your users are pressing? This tutorial teaches you a rock solid method that you can build in games and advanced applications. This is extremely easy. Firstly open a new form, or the form that you would like to catch the key presses on. We can then declare a new procedure: Code Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 'space for your code End Sub Now this is the only tricky bit, (if you have no understanding of computers what-so-ever). When you press the letter "d" on the keyboard, you are not sending "d" to the comptuer, you are sending a number. Every key on your keyboard has it own, unique, number. So if I wanted to find out what the key of anything is, I made a form that would tell me. Whenever I pressed a key, it would set the .text property of a disabled input field to the keycode value.

Hits: 610
Rate:   4.0(out of 5)  
Vote : 1   
Submit Date  : 2006-03-27
Submit By  : interviewmyass
View Tutorial Key trapping
 Add Review
 Report Error
Rating Graph

0.0%
0.0%
0.0%
100.0%
0.0%
 1  2  3  4  5 
Rate This :
More Tutorials by this user

The Basics of Visual Basic
 The Basics of Visual Basic
Key trapping
 Key trapping
  
Home | Sitemap | Feedback | Advertise with us
Best viewed in 800x600 resolution with Internet Explorer.
Site Developed and Hosted by EthicSolutions

Flash Tutorials    TemplateAdvisor.com    WebMastersHome.com

    Reseller Hosting    Reseller Hosting Linux