Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Opening a Form using HOT KEYS...

Posted on 1999-06-22
11
Medium Priority
?
194 Views
Last Modified: 2010-05-02
Is there a way to open a form with hot keys (Ctrl-Alt-X for example) without having it on a menu or toolbar button.  I
would like to have this form hidden from users, sort of a backdoor?
0
Comment
Question by:rmoscoso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 5

Expert Comment

by:KDivad
ID: 1519015
Use the KeyUp event. KeyUp returns the Ctrl-Alt-Shift combination and the key code of the key pressed.
0
 
LVL 1

Expert Comment

by:jdunck
ID: 1519016
 Set the form's KeyPreview property to TRUE, and use the form's KeyUp event, as KDivad said.  
  If you don't set the KeyPreview property to true, then if any of the controls on the form have focus, the form's KeyUp event won't hear the control's keypresses.


0
 

Author Comment

by:rmoscoso
ID: 1519017
Allright guys, lock the question so I can hand out the points....



0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Expert Comment

by:jdunck
ID: 1519018
KDivad had the basic answer.. He should get it, I guess.
0
 
LVL 1

Expert Comment

by:apratima
ID: 1519019
Well you can very well do that with keyup event but the problem is keyup events are restricted to particular forms.
If you display some other form on that form or if you close that form in which keyup event is there, it is not gonna help you any more. Not even if you are using menu.
You will have to activate that form and then you can do that.
I will find out some solution and get back to you

0
 
LVL 1

Expert Comment

by:jdunck
ID: 1519020
You are correct apratima.

However, you could easily write 1 routine to actually do the logic, passing the parameters given in the KeyUp event.

Then, every form has this:

Private Sub FormName_KeyUp(KeyCode As Integer, Shift As Integer)

  gsProcessHotKey KeyCode, Shift

End Sub


  -Simple.
0
 
LVL 1

Expert Comment

by:apratima
ID: 1519021
Yaap, I agree with jdunck
0
 
LVL 5

Expert Comment

by:KDivad
ID: 1519022
You want me to place an answer to this?
0
 
LVL 3

Expert Comment

by:ivanc
ID: 1519023
I would like to suggest is it simpler if U introduce a command button that would load the form.  Furthermore, in the command button the caption can be &file and the hot key would be Alt F.

Just a suggestion

Ivan
0
 

Author Comment

by:rmoscoso
ID: 1519024
For KDivad, yeah go ahead an place an answer,
that way you can get your points...
0
 
LVL 5

Accepted Solution

by:
KDivad earned 150 total points
ID: 1519025
Here's my answer.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…
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…
Suggested Courses

704 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