|
-
Sep 5th, 2005, 03:27 AM
#1
Thread Starter
Hyperactive Member
Intercepting F1 key
Hello everybody
I have an MDI VB 6 application. Child forms can be opened from various menus in that form. I would like the user to be able to call the Help subsystem by pressing the F1 key anywhere in the application.
Is there an easy way to do this? E.t.c. from the KeyPress event of a form or do I need to subclass the events message hanlder?
thx, in advance
George Papadopoulos
-
Sep 5th, 2005, 03:34 AM
#2
Re: Intercepting F1 key
I don't think you need to trap it, I think its just about setting properties for the forms and controls...
-
Sep 5th, 2005, 04:13 AM
#3
Thread Starter
Hyperactive Member
Re: Intercepting F1 key
I have found that in the project properties I can input a help file. Does this mean that the Help file is being incorporated into the executable?
-
Sep 5th, 2005, 05:20 PM
#4
Re: Intercepting F1 key
 Originally Posted by divined
I have found that in the project properties I can input a help file. Does this mean that the Help file is being incorporated into the executable?
u r right.......using the project properties regarding help file, u just need to enter the filename n there u got it, just click the F1 key n this help file will be incorporated into the Exe of ur project.
-
Sep 19th, 2005, 12:49 PM
#5
Thread Starter
Hyperactive Member
Re: Intercepting F1 key
The only drawback being that my application is MDI. Thus, when only the main form is open pressing F1 has no effect whatsoever. If a single child form is opened then it works.
Any ideas on why this is so?
-
Sep 19th, 2005, 01:09 PM
#6
Re: Intercepting F1 key
If it doesn't work I'd suggest you trap the KeyPress event in your MDI parent form.
-
Sep 19th, 2005, 01:16 PM
#7
Hyperactive Member
Re: Intercepting F1 key
I have also got some problems like this in VB6.0 which if I make a code in the menu which supposed to be pops up the Help file
VB Code:
Private Sub mnuContent_Click()
SendKeys "{F1}", True
End Sub
But it doesnt work at all, well it gave me no choice but to make a small form frmHelp
and recode it like this and it pops the Help File...
VB Code:
Private Sub mnuContent_Click()
frmHelp.Visible = False
frmHelp.Show
SendKeys "{F1}", True
frmHelp.Hide
End Sub
BTW, the HELP file was also integrated in the Project Property.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|