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.
Printable View
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.
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
Ok, thanks. Now, anyone for the webbrowser back button?
In the mean time, I am going to read some tutorials.
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.
Ok *takes notes*. If anyone know's any other way. Let me know.