|
-
May 21st, 2001, 12:20 AM
#1
Adding Sub To Webbrowser Control
Hello,
I wanted to add a keypress sub to the webbrowser control but it doesn't seem to work. Here's my code:
Code:
Private Sub WebBrowser1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
MsgBox "NO ENTER PLEASE!"
End If
End Sub
Please help!
Thanks In Advance!
-
May 21st, 2001, 05:23 AM
#2
someone, anyone, everyone?
-
May 21st, 2001, 06:10 AM
#3
Use the GetAsyncKeyState API function.
-
May 21st, 2001, 06:13 AM
#4
Here's an example of how to use it.
Code:
Private Declare Function GetAsyncKeyState Lib "user32.dll" _
(ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyReturn) Then Msgbox "NO ENTER PLEASE!"
End Sub
-
May 21st, 2001, 07:49 AM
#5
Is there another way, I don't want to check the whole time, only when enter is pressed in the webbrowser, because there are other places on the form, and there is no order of data entry or something of the sort.
-
May 21st, 2001, 08:54 AM
#6
Addicted Member
If the WebBrowser control doesn't support an event in the dropdown list, IMHO there's no way to *make* it...you have to use workaround API calls
Things I've Said:
"Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
"Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
"You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"
-
May 21st, 2001, 09:04 AM
#7
I know it's a big question but can i subclass it somehow?
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
|