|
-
Apr 5th, 2010, 03:27 PM
#1
Thread Starter
Junior Member
[RESOLVED] WebBrowser
Hello!
I'm making a WebBrowser for fun I'm stuck on somethings
Bold I don't need help with anymore
1. I want to be able to make the browser save history from visited websites and view them in a different form (view about 7 in a menu item)
2. How would I make the textbox in the toolstrip resize to the remaining space
on the form resize event also the form start's maximized so it would need to work with that
3. I got a problem with my bookmarks when I remove a bookmark I have to restart the form to be able to see any changes too it (this is in a menu)
I want to be able to remove a bookmark and make it automatic update so no need to restart the form
Current code
Code:
Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
My.Settings.Save()
End Sub
Private Sub RemoveBookMarkITM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemoveToolStripMenuItem.Click
My.Settings.BrowserBookmarks.Remove(MainBrowser.Url.ToString)
MainMenuStrip.Refresh()
End Sub
4. Make a combobox show previous searches in items
5. How to clear Cache, Cookies, History, Active logins
6. How to open a new windows in my browser NOT internet explorer
If I haven't explained so you understand it please let me know and I will try give you more information
Danny <3
Last edited by Late3; Apr 17th, 2010 at 05:59 PM.
Reason: Updated
-
Apr 5th, 2010, 03:40 PM
#2
Addicted Member
Re: WebBrowser
I think that:
Code:
ReplaceWithNameOfToolbar.Update
will refresh your toolbar.
In order to use a home page, you can save the home page URL in your settings... And when your Browser starts, check to see if there is a homepage saved. If there is, load that URL...
VBNetDude - Thinking Programmatically
By Silver Seal Software
Don't forget to mark your thread as "Resolved" using the Thread Tools menu on top. And don't forget to rate the answers that help you the most! 
-
Apr 5th, 2010, 03:46 PM
#3
Thread Starter
Junior Member
Re: WebBrowser
 Originally Posted by VBNetDude
I think that:
Code:
ReplaceWithNameOfToolbar.Update
will refresh your toolbar.
In order to use a home page, you can save the home page URL in your settings... And when your Browser starts, check to see if there is a homepage saved. If there is, load that URL...
No it didn't work still have to restart the browser to see changes
I'll give it atry
Danny<3
-
Apr 5th, 2010, 04:20 PM
#4
Thread Starter
Junior Member
Re: WebBrowser
I get the string to show in the text box but how would I let a user save it
vb Code:
Private Sub OptionFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load OptionHomePageText.Text = My.Settings.Homepage End Sub Private Sub OptionSaveBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptionSaveBTN.Click >>>>>OptionHomePageText.Text<<<<< End Sub
I'm stuck there (where the <<>> are)
-
Apr 7th, 2010, 03:59 AM
#5
Thread Starter
Junior Member
Re: WebBrowser
 Originally Posted by Late3
I get the string to show in the text box but how would I let a user save it
vb Code:
Private Sub OptionFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OptionHomePageText.Text = My.Settings.Homepage
End Sub
Private Sub OptionSaveBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptionSaveBTN.Click
>>>>>OptionHomePageText.Text<<<<<
End Sub
I'm stuck there (where the <<>> are)
Sorted this anyone help with other things?
-
Apr 7th, 2010, 05:18 AM
#6
Fanatic Member
Re: WebBrowser
if you look in the codebank board of the forums you will find an example of a multi tabbed browser, there is also an enhanced version which implements bookmarks. this would be a good base fro your needs regarding points 3 & 6
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
Apr 7th, 2010, 01:31 PM
#7
Thread Starter
Junior Member
Re: WebBrowser
 Originally Posted by Megalith
if you look in the codebank board of the forums you will find an example of a multi tabbed browser, there is also an enhanced version which implements bookmarks. this would be a good base fro your needs regarding points 3 & 6
Thanks ;D
-
Apr 7th, 2010, 02:09 PM
#8
Lively Member
Re: WebBrowser
Regarding clear cache etc use one of the following or do as I did and create menu options for each of them.
Code:
'Temporary Internet Files
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 8")
'Cookies()
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 2")
'History()
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 1")
'Form(Data)
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 16")
'Passwords()
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 32")
'Delete(All)
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 255")
'Delete All – Also delete files and settings stored by add-ons
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 4351")
Hope this helps.
Regards
Colin
-
Apr 8th, 2010, 04:17 AM
#9
Thread Starter
Junior Member
Re: WebBrowser
 Originally Posted by wearmc
Regarding clear cache etc use one of the following or do as I did and create menu options for each of them.
Code:
'Temporary Internet Files
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 8")
'Cookies()
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 2")
'History()
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 1")
'Form(Data)
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 16")
'Passwords()
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 32")
'Delete(All)
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 255")
'Delete All – Also delete files and settings stored by add-ons
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 4351")
Hope this helps.
Regards
Colin
Thanks for that!
-
Apr 8th, 2010, 05:39 AM
#10
Thread Starter
Junior Member
Re: WebBrowser
Also MainBrowser.cangoback/forward isn't working for me? 
-
Apr 8th, 2010, 01:49 PM
#11
Thread Starter
Junior Member
Re: WebBrowser
Anyhelp with the rest? I've given a more description on what I want them todo
-
Apr 9th, 2010, 09:07 AM
#12
Thread Starter
Junior Member
Re: WebBrowser
Also I want to add it so if it has a secure https:// it will turn green addressbar
(I know howto do but don't understand how to make it so when its secure it goes green and when its insecure it goes red like internet explorer)
-
Apr 13th, 2010, 06:09 PM
#13
Thread Starter
Junior Member
Re: WebBrowser
 Originally Posted by Late3
Also I want to add it so if it has a secure https:// it will turn green addressbar
(I know howto do but don't understand how to make it so when its secure it goes green and when its insecure it goes red like internet explorer)
Done this! 
How do I do the rest of stuff in my first post and also how do I make my own menu (for right clicking) insted of the IE default
-
Apr 13th, 2010, 07:42 PM
#14
Thread Starter
Junior Member
-
Apr 17th, 2010, 04:40 PM
#15
Thread Starter
Junior Member
-
Apr 17th, 2010, 05:48 PM
#16
Addicted Member
Re: WebBrowser
To keep track of the History, Just references this in the WebBrowser Document complete or Webbrowser Navigated Events:
Code:
WebBrowser1.Url.ToString
As for the Textbox/Toolstrip resizing, you need to use Anchors.
Click here for Anchors help
For the bookmarks, just type this after deleting a bookmark:
Code:
toolbarname.Update()
Whenever you do a search, just put this in:
Code:
ComboBoxName.Items.Add(ComboBoxName.Text)
-
Apr 17th, 2010, 05:58 PM
#17
Thread Starter
Junior Member
Re: WebBrowser
 Originally Posted by Mal1t1a
For the bookmarks, just type this after deleting a bookmark:
Code:
toolbarname.Update()
It atually has this code i forgot to enter it into the text in my first post
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|