|
-
Jul 18th, 2000, 09:42 PM
#1
Thread Starter
New Member
i'm making a key code so when someone hits the button 'A' on their keyboard, my program will go to http://www.aol.com (for example) .. this is what i have:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'If different Keys are pressed then set the URL to different websites
If KeyCode = vbKeyA Then URL = "www.vb-world.net"
If KeyCode = vbKeyUp Then URL = "www.hotmail.com"
If URL <> "" Then
'Open the website specified in URL in WebBrowser1
WebBrowser1.Navigate URL
End If
End Sub
And I also tried:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 97 Then WebBrowser1.Navigate("http://www.aol.com")
End Sub
i hope these 2 are even close, but both didn't work..
plz tell me whats wrong..
((VB 6))
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
|