Google Web Service (VB.NET) code

xiaoxiao2021-03-06  41

#Region "Windows Form Designer Generated Code"

Public Sub new () mybase.new ()

'This call is required by the windows form designer. InitializationComponent ()

'Add anyinitization after the initializecomponent () CALL

End Sub

'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose (ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose () End If End If MyBase.Dispose (disposing) End Sub

'Required by The Windows Form Designer Private Components as System.comPonentModel.icontainer

'NOTE: The following procedure is required by the Windows Form Designer' It can be modified using the Windows Form Designer 'Do not modify it using the code editor Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents tkey As System.. .Windows.Forms.TextBox Friend WithEvents search As System.Windows.Forms.TextBox Friend WithEvents rst As System.Windows.Forms.TextBox Private Sub InitializeComponent () Me.Button1 = New System.Windows .Forms.Button Me.tkey = New System.Windows.Forms.TextBox Me.search = New System.Windows.Forms.TextBox Me.rst = New System.Windows.Forms.TextBox Me.SuspendLayout () '' Button1 'Me .Button1.Location = new system.drawing.point (192, 32) me.button1.name = "Button1" me.button1.tabindex = 0 me.button1.text = "Button1" '' TKEY 'me.tkey.location = New system.drawing.point (24 , 24) Me.tkey.name = "TKEY" me.tkey.tabindex = 1 me.tkey.text = "" 'Search' me.search.location = new system.drawing.point (16, 72) ME. Search.name = "Search" me.search.tabindex = 2 me.search.text = "" '' RST 'me.rst.location = new system.drawing.point (16, 120) me.rst.name = " RST "me.rst.tabindex = 4 me.rst.text =" "'' FORM1 'me.autoscalebasesize =

New system.drawing.size (6, 14) me.clientsize = new system.drawing.size (292, 273) me.controls.add (me.rst) Me.Controls.add (me.search) me.controls. Add (me.tkey) me.controls.add (me.button1) me.name = "form1" me.text = "form1" me.resumeLayout (false) end sub

#End region

Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sv As goole.GoogleSearchService = New goole.GoogleSearchService Dim result As goole.GoogleSearchResult = New goole.GoogleSearchResult Dim mykey As String mykey = "WGSCD" Result = sv.dogooglesearch (MyKey, Search.Text, 0, 1, False, ", False,", "," ") Rst.Text =" Total Found: "& CStr (Result.ESTIMATEDTOTAALRESULTSCOUNT ) End Sub

END CLASS

转载请注明原文地址:https://www.9cbs.com/read-86498.html

New Post(0)