Solved

Intercepting keystrokes on an MDI form

Posted on 1998-12-09
2
239 Views
Last Modified: 2012-06-21
Do you know if there is any way that I can intercept keystrokes on an MDI form?
I can do this with a 'standard' from by setting the KeyPreview Property to True and trapping the keystroke with the KeyPress Event.

Thanks in advance,
David.
0
Comment
Question by:dadzie
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
Foyal earned 100 total points
ID: 1449124
dadzie-

Private Sub MDIForm_Load
    Dim NewForm As New Form1
    NewForm.Show
End Sub

In Form1 set .KeyPreview to True and write your key trapping code. This way the MDIForm.ActiveForm should get the focus.
*maybe*

0
 
LVL 3

Expert Comment

by:Foyal
ID: 380
I hope you would take this "D" grade and stick it right up your ass.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

825 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