Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making form visible with keycombination.

Status
Not open for further replies.

PhilippeSignoret

Programmer
May 19, 2001
21
0
0
MX
I have a form that I make invisible (form1.visible = false)
how can I make it visible again by using a combination of keys (pressing < Ctrl + h > for example)?

Thanks in advance.

Philippe
 
The fastest and easiest way, even though not elegant: The MDI form does not have a keypress event. So, on the MDI form create a menu item and assign it the key combination you want as a ShortCut Key. This will be activated no matter what form is showing - as long as the menu item is enabled and visible.
The next easiest way would be to add a proceedure to every form that calls a public proceedure in the MDI form.
Then, no matter what form is active, the same proceedure will get called.

If no forms are active, then you may want to do the first suggestion or use a timer on the MDI Form and add the GetAsyncKeyState API function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top