Ctrl + Enter in WebBrowser control

how do i allow the web browser to enable Ctrl + Enter so that one can just type google then Ctrl enter.
[103 byte] By [IceAngel89] at [2007-12-28]
# 1
ctrl + enter? What is this meant to do? do you not mean just the enter key? Can you explain a bit more on what you are trying to do so we can help you better? :-)
ahmedilyas at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

i was tring to allow Ctrl + enter like in IE u can type google, then Ctrl + enter then, "www." and ".com" will be added. but i did it using a button already, in the button click event i did, the code maybe wrong but its something like that - i am typing from school, i don't have vb in this lab

if txtAddress.text not like("www.*.com") then
txtAddress.text &= txtAddress.text.insert(0, "www.")
txtAddress.text &= txtAddress.text.insert(txtAddress.text.length, ".com")

IceAngel89 at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 3

well if you have a textbox, txtaddress, and you press control and enter, you could check to see if those keys are pressed and if so then do your thing. implement the keydown event then do the following...

if e.Control = true AND e.KeyCode = Keys.Enter then

if Me.txtAddress.Text.StartsWith("www.") = false then

Me.txtAddress.Text = Me.txtAddress.Text.Insert(0, "www.")

end if

if Me.txtAddress.Text.EndsWith(".com") = false then

Me.txtAddress.Text = Me.txtAddress.Insert(Me.txtAddress.Text.Length, ".com")

end if

Me.theWebBrowser.Navigate(Me.txtAddress.Text)

end if

ahmedilyas at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 4
oh yes i think that will work better thanks!
IceAngel89 at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic Language...