Solved

Using Arrow Keys in VB5

Posted on 1998-08-30
2
279 Views
Last Modified: 2010-04-30
I'd like to know how to detect the user pressing the arrow keys in vb5. A little example source would be plus :). And hey, it's worth 200 points.
0
Comment
Question by:loopdloop
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
percosolator earned 200 total points
ID: 1431849
Make a new project, draw a textbox on the form, let VB name it.

Paste-in this code.

----------------------
Option Explicit
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)

    Select Case KeyCode
   
        Case vbKeyUp
            MsgBox "Up Arrow Was Pressed on Text1"
        Case vbKeyDown
            MsgBox "Down Arrow Was Pressed on Text1"
        Case vbKeyLeft
            MsgBox "Left Arrow Was Pressed on Text1"
        Case vbKeyRight
            MsgBox "Right Arrow Was Pressed on Text1"
    End Select
   
End Sub

0
 
LVL 2

Expert Comment

by:percosolator
ID: 1431850
Oh.... if you need any more, just ask.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question