|
-
Oct 23rd, 2001, 09:26 PM
#1
Thread Starter
Fanatic Member
Open help file from VB
In my app, when pressing F1 key the help file is displayed. However, when the "Tips of the day" form is displayed, pressing F1 does not do anything (in winzip, if "Tips of the day" is shown, pressing F1 key will show the help file as well)
What should I do to my "Tips of the day" to make it display help file when pressing F1 key?
Thanks
-
Oct 23rd, 2001, 09:40 PM
#2
PowerPoster
-
Oct 23rd, 2001, 11:07 PM
#3
Thread Starter
Fanatic Member
What's kind of answer is this?
No wonder he got so many post.
This is a good site. I did not expect to get some answer like this.
-
Oct 23rd, 2001, 11:08 PM
#4
PowerPoster
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 24th, 2001, 02:51 AM
#5
PowerPoster
Hi
If the Tips of the day popup is a form (as against a pic box or frame) then it will have focus and the main form will not receive the key press event. U could make set the keypreview of the Tips form to true and check the keypress event also. NB If the tips of the day form is modal this can cause problems. A better way is to make the form modeless but always on top and then set it to 'not always on top' when the help file is loaded
Regards
Stuart
-
Oct 24th, 2001, 07:14 AM
#6
PowerPoster
Originally posted by TheBao
What's kind of answer is this?
No wonder he got so many post.
This is a good site. I did not expect to get some answer like this.
I thought you only wanted to know wether you should check for a keypress in "Tip of the Day" form too.
you can use a timer on both form (main form and also Tip of Day form), and then use "GetAsyncKeyState" to see if "F1" is pressed. If yes, then you show the help file.
Here is how you use "GetAsyncKeyState" API:
VB Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_F1 = &H70
Private Sub Timer1_Timer()
' This check to see if F1 is pressed
If (GetAsyncKeyState(VK_F1) <> 0) Then
'show the help file
End If
Hope that is a little helpful.
-
Oct 24th, 2001, 04:41 PM
#7
Thread Starter
Fanatic Member
Thank you all. Sorry abdul for not understand my question clearly.
Regards.
-
Oct 24th, 2001, 04:43 PM
#8
PowerPoster
Originally posted by TheBao
Thank you all. Sorry abdul for not understand my question clearly.
Regards.
No problem I don't know why I read your post like this:
What should I do to my "Tips of the day". make it display help file when pressing F1 key?
instead of
What should I do to my "Tips of the day" to make it display help file when pressing F1 key?
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
|