Merhabalar ,
Önce Google.com'a Rastgele Bir Yazı Arıyalım..
Örnek : Ben Wardom' Olarak Aradım ,
İşte URL'Deki Kodumuz :
http://www.google.com.tr/search?hl=tr&q=Wardom&meta=
Bu Kodu Nasıl Kulanarak Google'de Arama Yapılır Size Gösteriyim !..
Program'a Tabi Önceden Bir Browser, Bir Textbox , Birde Button' Koyduğunuzu Farz Ediyorum..
![]()
Şimdi Bir Button Birde Textbox Vede Birtane'de WebBrowser'ımız Var , Normalde Button'umuzun Koduna ( Code ) Bölümüne / WebBrowser1.Navigate Text1.Text / Yazarsak Direk WebBrowser'da Textbox'a Yazılan Adrese Gider..
Şimdi Biz Bu Kodu Şöyle Yaparsak ,
WebBrowser1.Navigate ("http://www.google.com.tr/search?hl=tr&q=") + Text1.Text + ("&meta=")
Text1.Text'e Ne Yazılırsa Google.Com'da Arar Bu iki Kodun Farkına Bakalım Lütfen..
![]()
1: http://www.google.com.tr/search?hl=tr&q=Wardom&meta=
2: WebBrowser1.Navigate ("http://www.google.com.tr/search?hl=tr&q=") + Text1.Text + ("&meta=")
Umarım Yardımcı Olmuşumdur Teşekürler..
Örnek Projeyi Download Etmek için Tıklayın..
'*Author*************************************************
'*Author:MBK *
'*Date:20/04/2010 *
'*Contact:mbk_kbm@hotmail.com *
'********************************************************
Private Sub Command1_Click() 'google
Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate "http://www.google.com"
oIE.Visible = True
Do While oIE.Busy And Not oIE.ReadyState = 4
DoEvents
Loop
oIE.Document.Forms(0).q.Value = Text1.Text
oIE.Document.Forms(0).submit
End Sub
Private Sub Command2_Click() 'yahoo
Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate "http://www.yahoo.com"
oIE.Visible = True
Do While oIE.Busy And Not oIE.ReadyState = 4
DoEvents
Loop
oIE.Document.Forms(0).p.Value = Text1.Text
oIE.Document.Forms(0).submit
End Sub
Private Sub Command3_Click() 'bing
Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate "http://www.bing.com"
oIE.Visible = True
Do While oIE.Busy And Not oIE.ReadyState = 4
DoEvents
Loop
oIE.Document.Forms(0).q.Value = Text1.Text
oIE.Document.Forms(0).submit
End Sub