|
-
Aug 3rd, 2004, 03:25 PM
#1
Thread Starter
Lively Member
Getting key press
How do you get a key press from a text box (Example: Enter)?
How would you get the last URL from a string (like clicking back button) same goes for forward.
Any help appreciated.
-
Aug 3rd, 2004, 03:46 PM
#2
PowerPoster
Here's how to get the keypress:
VB Code:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Convert.ToChar(Keys.Enter) Then
MessageBox.Show("Enter was pressed", "Key Pressed", MessageBoxButtons.OK, MessageBoxIcon.Information)
e.Handled = False
Else
e.Handled = True ' don’t allow any other keys.
End If
End Sub
-
Aug 4th, 2004, 01:37 PM
#3
Thread Starter
Lively Member
Ok, thanks. Now, anyone for the webbrowser back button?
In the mean time, I am going to read some tutorials.
-
Aug 4th, 2004, 02:02 PM
#4
I wonder how many charact
you can get a complete history using javascript, because history resides on the client-side.
However, you can get referUrl of the HttpRequest (or its the Response don't remember offhand), to tell which page brought you to the current page.....
You could also log every request made from a particular session, but ultimately thats rather clunky.
-
Aug 4th, 2004, 02:13 PM
#5
Thread Starter
Lively Member
Ok *takes notes*. If anyone know's any other way. Let me know.
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
|