Hi there,
I have a system on my webbrowser that allows the user to choose their Search Engine out of a selection I organized. the down point is that I have it set so when they click save it will just hide, because if it closes the settings will be reset and not saved. However I want them to save. Here are my codes to the search button:
This is the code of save:Code:Private Sub Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search.Click If SearchEngines.RadioButton1.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.com/search?hl=en&q=" & SearchBar.Text & "&btnG=Google+Search&meta=") End If If SearchEngines.RadioButton2.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://search.yahoo.com/search?p=" & SearchBar.Text & "&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8&fp_ip=IN&vc=") End If If SearchEngines.RadioButton3.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://images.google.ca/images?hl=en&q=" & SearchBar.Text) End If If SearchEngines.RadioButton4.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://en.wikipedia.org/wiki/Special:Search?search=" & SearchBar.Text) End If If SearchEngines.RadioButton6.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://video.google.com/videosearch?q=" & SearchBar.Text) End If If SearchEngines.RadioButton5.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.youtube.com/results?search_type=&search_query=" & SearchBar.Text) End If If SearchEngines.RadioButton7.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.ask.com/web?q=" & SearchBar.Text & "&search=&qsrc=0&o=0&l=dir") End If If SearchEngines.RadioButton8.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://news.google.ca/news?hl=en&tab=ln&nolr=1&q=" & SearchBar.Text) End If End Sub
I would like it so it saves when the whole program is closed, so when they start up it's automatically set so they can search on their favourite search engine.Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() End Sub




Reply With Quote