Results 1 to 17 of 17

Thread: [RESOLVED] WebBrowser

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Resolved [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

  2. #2
    Addicted Member
    Join Date
    Oct 2009
    Location
    Clive, IA in America!!!!
    Posts
    204

    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!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by VBNetDude View Post
    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

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    I get the string to show in the text box but how would I let a user save it

    vb Code:
    1. Private Sub OptionFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         OptionHomePageText.Text = My.Settings.Homepage
    3.     End Sub
    4.  
    5.     Private Sub OptionSaveBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptionSaveBTN.Click
    6.         >>>>>OptionHomePageText.Text<<<<<
    7.     End Sub

    I'm stuck there (where the <<>> are)

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by Late3 View Post
    I get the string to show in the text box but how would I let a user save it

    vb Code:
    1. Private Sub OptionFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         OptionHomePageText.Text = My.Settings.Homepage
    3.     End Sub
    4.  
    5.     Private Sub OptionSaveBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptionSaveBTN.Click
    6.         >>>>>OptionHomePageText.Text<<<<<
    7.     End Sub

    I'm stuck there (where the <<>> are)
    Sorted this anyone help with other things?

  6. #6
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    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.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by Megalith View Post
    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

  8. #8
    Lively Member
    Join Date
    Jan 2010
    Location
    United Kingdom
    Posts
    115

    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
    Regards
    Colin

    If my comments helped please remember to add to my reputation using Rate This Post.

    If your problem has been resolved please mark the thread resolved using the "Mark Thread Resolved" link in thread tools.

    CodeBank Submissions: 1) WebBrowser - Delete cookies etc 2) Import My.Settings from previous build version

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by wearmc View Post
    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!

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Also MainBrowser.cangoback/forward isn't working for me?

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Anyhelp with the rest? I've given a more description on what I want them todo

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    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)

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by Late3 View Post
    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

  14. #14

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by Late3 View Post
    Also MainBrowser.cangoback/forward isn't working for me?
    Sorted this!

  15. #15

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Help on other stuff?

  16. #16
    Addicted Member Mal1t1a's Avatar
    Join Date
    Mar 2008
    Posts
    157

    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)

  17. #17

    Thread Starter
    Junior Member
    Join Date
    Sep 2009
    Posts
    25

    Re: WebBrowser

    Quote Originally Posted by Mal1t1a View Post
    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
  •  



Click Here to Expand Forum to Full Width