Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. WebBrowser1.DocumentText =
  2. "<html><body>Search in Google:<br/>" &
  3. "<form method='get' action='http://www.google.com/search'>" &
  4. "<input type='text' name='as_q'/><br/>" &
  5. "<input type='submit' value='Search'/>" &
  6. "</form></body></html>"
  7.  
  8. End Sub
  9.  
  10. Dim document = WebBrowser1.Document
  11. If document IsNot Nothing And
  12. document.All("as_q") IsNot Nothing And
  13. String.IsNullOrEmpty(
  14. document.All("as_q").GetAttribute("value")) Then
  15. e.Cancel = True
  16. MsgBox("Please enter a search term.")
  17. End If
  18.  
  19. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement