| View previous topic :: View next topic |
| Author |
Message |
emperus Expert Cheater
Reputation: 0
Joined: 24 Jul 2007 Posts: 142 Location: Amd Phenom 2.2ghz Triple Core
|
Posted: Sun Oct 05, 2008 8:51 am Post subject: Web Browser creating help plz |
|
|
i created a Wb but if i try adding a settings form with a set homepage option i dont know the code to save changes and it allways restarts to the same homepage..
im using vb8 can someone help plz
|
|
| Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sun Oct 05, 2008 10:33 am Post subject: |
|
|
If you want to change internet explorer's homepage edit the registry like this:
Software\Microsoft\Internet Explorer\Main\Start Page = [THE NEW HOMEPAGE]
Example usage in Delphi (I know you are using VB 2008 but I only know Delphi and C++) - http://delphi.about.com/cs/adptips2004/a/bltip0204_5.htm
|
|
| Back to top |
|
 |
blackdiamond Expert Cheater
Reputation: 0
Joined: 06 Oct 2007 Posts: 161
|
Posted: Sun Oct 05, 2008 10:43 am Post subject: |
|
|
you could use this when the homepage button is clicked
Dim homepage As String = "forum.cheatengine.org"
webbrowser1.navigate(homepage)
and when the form loads it's even easier
webbrowser1.navigate("forum.cheatengine.org")
don't forget the quotation marks.
EDIT: sorry didn't read it right, i'l look into this and post the real answer.
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun Oct 05, 2008 11:12 am Post subject: |
|
|
you can save to file the homepage name and when the WB is loading read the name from the file and navigate there
_________________
Stylo |
|
| Back to top |
|
 |
Frostbyt3 Master Cheater
Reputation: 0
Joined: 07 Jan 2008 Posts: 323 Location: Australia
|
Posted: Sun Oct 05, 2008 5:39 pm Post subject: |
|
|
| Code: |
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim homepage As String
homepage = My.Computer.FileSystem.ReadAllText("hp.txt")
WebBrowser1.Navigate(Homepage)
|
And the contens of hp.txt will be
| Code: |
http://www.google.com
|
Post again if you need an example project.
|
|
| Back to top |
|
 |
Polynomial Grandmaster Cheater
Reputation: 5
Joined: 17 Feb 2008 Posts: 524 Location: Inside the Intel CET shadow stack
|
Posted: Sun Oct 05, 2008 7:35 pm Post subject: |
|
|
If you're using VB.NET, then use the My.Settings feature.
Go into Project -> Properties and click the Settings tab. Add a string setting called HomePage.
Then, in your code reference this setting as My.Settings.HomePage. If you modify this value in your code and want to save it, use My.Settings.Save().
For example:
| Code: | Private Sub btnSetHomepage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSetHomepage.Click
My.Settings.HomePage = txtHomePage.Text
My.Settings.Save()
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate(My.Settings.HomePage)
End Sub |
|
|
| Back to top |
|
 |
emperus Expert Cheater
Reputation: 0
Joined: 24 Jul 2007 Posts: 142 Location: Amd Phenom 2.2ghz Triple Core
|
Posted: Fri Oct 10, 2008 7:03 am Post subject: |
|
|
| ok guys thank you very mutch
|
|
| Back to top |
|
 |
|