Search Engine

Using checkboxes in Visual Basic and combobox to search a specific ite

Page 1 of 1

4 Replies - 3237 Views - Last Post: 04 October 2009 - 12:51 PM Rate Topic: -----

#1 mihaispr  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 114
  • Joined: 29-September 09

Search Engine

Post icon  Posted 03 October 2009 - 10:19 AM

Hi everyone and thanks for patience in reading my question.

I have a little problem in my code to make a search engine using Visual Basic 2008 Express:

Here's the full code:
 
Public Class Form1

	Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		If ComboBox1.Text = Nothing Then
			MsgBox("Introduceti un cuv. cheie pt.cautare", MsgBoxStyle.Information)
		Else
			If CheckBox1.Checked = True Then System.Diagnostics.Process("http://www.google.ro/#hl=ro&source=hp&q=" + ComboBox1.Text.ToString)
			SaveSetting("Search Box", "Search", "KeyWord", ComboBox1.Text)
			SaveSetting("Search Box", "Search", "Google", CheckBox1.CheckState)
			SaveSetting("Search Box", "Search", "Yahoo", CheckBox2.CheckState)
			SaveSetting("Search Box", "Search", "Bing", CheckBox3.CheckState)
			SaveSetting("Search Box", "Search", "ASK", CheckBox4.CheckState)
			SaveSetting("Search Box", "Search", "AOL", CheckBox1.CheckState)
		End If
	End Sub

	Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		ComboBox1.Text = GetSetting("SearchBox", "Search", "Keyword", ComboBox1.Text)
		CheckBox1.Checked = GetSetting("Search Box", "Search", "Google", CheckBox1.CheckState)
		CheckBox2.Checked = GetSetting("Search Box", "Search", "Yahoo", CheckBox2.CheckState)
		CheckBox3.Checked = GetSetting("Search Box", "Search", "Bing", CheckBox3.CheckState)
		CheckBox4.Checked = GetSetting("Search Box", "Search", "ASK", CheckBox4.CheckState)
		CheckBox5.Checked = GetSetting("Search Box", "Search", "AOL", CheckBox5.CheckState)
	End Sub
End Class



Here's the full source(project) attached here to have better chances to help me:


http://www.flyupload...get?fid=9452445

Is This A Good Question/Topic? 0
  • +

Replies To: Search Engine

#2 Asscotte  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 35
  • View blog
  • Posts: 610
  • Joined: 08-February 09

Re: Search Engine

Posted 03 October 2009 - 10:25 AM

...What is the problem?...
Was This Post Helpful? 0
  • +
  • -

#3 mihaispr  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 114
  • Joined: 29-September 09

Re: Search Engine

Posted 03 October 2009 - 10:49 AM

View PostAsscotte, on 3 Oct, 2009 - 09:25 AM, said:

...What is the problem?...


Hi Asscotte and thanks for your reply.

My problem is that I want when I press the button to search for a topic( html tutorial ) for example using google.


And also I have an error as you can see from this printscreen.

My problem is that when I press the button nothing happens :angry:


I attach here the printscreen :

Posted Image

This post has been edited by mihaispr: 03 October 2009 - 10:50 AM

Was This Post Helpful? 0
  • +
  • -

#4 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1533
  • View blog
  • Posts: 4,913
  • Joined: 25-September 09

Re: Search Engine

Posted 04 October 2009 - 05:23 AM

Try this

If CheckBox1.Checked = True Then System.Diagnostics.Process.Start("http://www.google.ro/#hl=ro&source=hp&q=" & ComboBox1.Text)



in place of what you have.

This post has been edited by CharlieMay: 04 October 2009 - 05:24 AM

Was This Post Helpful? 0
  • +
  • -

#5 mihaispr  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 114
  • Joined: 29-September 09

Re: Search Engine

Posted 04 October 2009 - 12:51 PM

View PostCharlieMay, on 4 Oct, 2009 - 04:23 AM, said:

Try this

If CheckBox1.Checked = True Then System.Diagnostics.Process.Start("http://www.google.ro/#hl=ro&source=hp&q=" & ComboBox1.Text)



in place of what you have.


Thank you very much charlie it's working as I wanted!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1