Private Sub btn_Search_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btn_Search.Click
Dim MyLicenseKey As String ' Variable to Store the License Key
' Declare variable for the Google search service
Dim MyService As Google.GoogleSearchService = New _
Google.GoogleSearchService()
' Declare variable for the Google Search Result
Dim MyResult As Google.GoogleSearchResult
' Please Type your license key here
MyLicenseKey = "tGCTJkYos3YItLYzI9Hg5quBRY8bGqiM"
' Execute Google search on the text enter and license key
MyResult = MyService.doGoogleSearch(MyLicenseKey, _
txtSearch.Text, 0, 1, False, "", False, "", "", "")
' output the total Results found
lbl_TotalFound.Text = "Total Found : " & _
CStr(MyResult.estimatedTotalResultsCount)
End Sub |