VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Adds a Google web search and image search with the option to turn on and off google safe search.

by C De'Ath ()
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 1st August 2009
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Adds a Google web search and image search with the option to turn on and off google safe search.

API Declarations


'2 option boxes called optWeb and optImages
'1 check box called chkSafeSearch
'1 Command box called cmdSearch
'1 Web Browser Control called WebBrowser1

Rate Adds a Google web search and image search with the option to turn on and off google safe search.



On Error Resume Next
If optWeb.Value = True And chkSafeSearch.Value = "1" Then
WebBrowser1.Navigate ("http://www.google.co.uk/search?hl=en&safe=on&q=" + (txtSearch.Text) + "&ie=UTF-8&sa=N")
End If
If optWeb.Value = True And chkSafeSearch.Value = "0" Then
WebBrowser1.Navigate ("http://www.google.co.uk/search?hl=en&safe=off&q=" + (txtSearch.Text) + "&ie=UTF-8&sa=N")
End If
If optImages.Value = True And chkSafeSearch.Value = "1" Then
WebBrowser1.Navigate ("http://images.google.co.uk/images?hl=en&safe=on&q=" + (txtSearch.Text) + "&um=1&ie=UTF-8&sa=N&tab=wi")
End If
If optImages.Value = True And chkSafeSearch.Value = "0" Then
WebBrowser1.Navigate ("http://images.google.co.uk/images?hl=en&safe=off&q=" + (txtSearch.Text) + "&um=1&ie=UTF-8&sa=N&tab=wi")
End If
End Sub

Download this snippet    Add to My Saved Code

Adds a Google web search and image search with the option to turn on and off google safe search. Comments

No comments have been posted about Adds a Google web search and image search with the option to turn on and off google safe search.. Why not be the first to post a comment about Adds a Google web search and image search with the option to turn on and off google safe search..

Post your comment

Subject:
Message:
0/1000 characters