Results 1 to 11 of 11

Thread: [RESOLVED] Need help with my web browser

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    7

    Resolved [RESOLVED] Need help with my web browser

    hi to all programmers
    i have a little trouble with my web browser which is that when i press maximize it looks like this
    Before

    After

    can u provide me with any code that can help me please?
    also id like to have in the status bar when the page is loading
    ex: Loading www.google.com...
    and when its done its says : done!
    thanx

  2. #2
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Need help with my web browser

    You need to use the Anchor settings.
    Click on a object (for example a textbox) and go to Properties window.
    Find the Anchor.
    Try setting your Google Search bar to
    Code:
    Top,Right
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  3. #3
    Member
    Join Date
    Apr 2009
    Posts
    35

    Re: Need help with my web browser

    use TableLayoutPanels, and the "Fill" property next to "Dock" in the Properties panel, takes a getting used to but it'll fix your problem

  4. #4
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: Need help with my web browser

    No dock won't work since it'll fill up his whole application. he needs to use the anchor settings in this case. You can use fill if you have a tabbed web browser because it will fill up the tab control, instead of the form itself.

    Just for information on anchor, anchor defines it's position on the form relative to the size of the control or the form itself, so it will resize but stay within the same margins as it began, dock will fill up all of a control's boundaries with the specified option of docking.

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    7

    Re: Need help with my web browser

    thanx guys i dont know how i could do that without u
    also id like to have in the status bar when the page is loading
    ex: Loading www.google.com...
    and when its done its says : done!
    thanx

  6. #6
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: Need help with my web browser

    that's not that hard. looks like a very simple browser, so here would be all you'd need. Do the same for the form load event as well if you want.

    vb Code:
    1. Public Class Form1
    2.     'This would be for the initial http request
    3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    4.         WebBrowser1.Navigate(TextBox1.Text)
    5.     End Sub
    6.     'Here's for the actual navigation event
    7.     Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
    8.         Label1.Text = "Loading " & TextBox1.Text
    9.     End Sub
    10.     'Here's after the navigation is done for the web request
    11.     Private Sub WebBrowser1_Navigated(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
    12.         Label1.Text = "Done"
    13.     End Sub
    14. End Class

    Just have to make sure that every web request changes the text in the textbox for the address bar on a web/http request, and it'll always get that loading information from the textbox as a second hand event.
    Last edited by AceInfinity; May 27th, 2011 at 04:01 PM.

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    7

    Re: Need help with my web browser

    thanx bro a loooot

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    7

    Re: Need help with my web browser

    3 days ago i was nothing at programming but now i can make codes all by myself
    thank you ace infity for the code but i added tabbed browsin and no need to give me a code cuz i made it maself

  9. #9
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: [RESOLVED] Need help with my web browser

    Very nice good to see another beginning inspired programmer out there. And no problem

  10. #10
    Member
    Join Date
    Apr 2009
    Posts
    35

    Re: Need help with my web browser

    Quote Originally Posted by AceInfinity View Post
    No dock won't work since it'll fill up his whole application. he needs to use the anchor settings in this case. You can use fill if you have a tabbed web browser because it will fill up the tab control, instead of the form itself.
    You can dock a TableLayoutPanel with Fill and dock panels in cells (with Fill too) and objects in that cell will dock according to that cell, its pretty cool because you can resize the window and everything will remain the same proportion.


    You can also put Tabels inside tabels and panels inside tables haha inception?

  11. #11
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: [RESOLVED] Need help with my web browser

    Quote Originally Posted by stagnit
    You can dock a TableLayoutPanel with Fill and dock panels in cells (with Fill too) and objects in that cell will dock according to that cell, its pretty cool because you can resize the window and everything will remain the same proportion.


    You can also put Tabels inside tabels and panels inside tables haha inception?
    No, there is always a correct way to something in programming, and an odd way.
    TableLayoutPanel is an odd solution in this case.
    The anchor, which I have suggested before is the best tool for the job. Its simple and it works properly with all the elements on the winform.
    The TableLayoutPanel is an element itself, which would require you drag-drop all the elements to it.
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

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