Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Keystrokes accelarators

Posted on 1998-09-21
3
Medium Priority
?
252 Views
Last Modified: 2010-04-30
I need to build a program that when you press
the F12 key a message box appers, without
considerations about who has the focus at that moment.

It´s the same as the shortcut for a menu (menu accelerator),
but I can not use menus in this program.
0
Comment
Question by:vincerubus
  • 2
3 Comments
 

Author Comment

by:vincerubus
ID: 1435836
Edited text of question
0
 
LVL 4

Accepted Solution

by:
mcix earned 200 total points
ID: 1435837
1. Set the KeyPreview property of the form to True
2. Insert the following the the KeyDown Event of the Form.

Select Case KeyCode

   Case vbKeyF12
      ' F12 defined in VBRUN
      MsgBox "Whatever you want to do"

End Select

0
 

Author Comment

by:vincerubus
ID: 1435838
thanks and congratulations
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code 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…
Suggested Courses

916 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