Hey...im trying to set my webbrowser to go to a certain site when the escape key is pressed..heres the code:
all it does is refresh the current site im at, well at least i think it does..shows a loading icon next to my cursor and makes a clicking noise..But anyone know why its not workin? the sma file holds the website address btw. Thanks
Code:
Protected Overrides Function ProcessDialogKey(ByVal keyData As Keys) As Boolean
Dim nullObject As System.Object = 0
Dim str As String = ""
Dim nullObjStr As System.Object = str
Dim b As String
Dim sr As New StreamReader("C:\sma.hh")
b = sr.ReadLine
If keyData = Keys.Escape Then
AxWebBrowser1.Navigate(b, nullObject, nullObjStr, nullObjStr, nullObjStr)
End If
Return MyBase.ProcessDialogKey(keyData)
End Function