[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
http://img20.imageshack.us/img20/8977/sansreum.png
After
http://img191.imageshack.us/img191/8829/sanstistre.png
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
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
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
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.
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
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:
Public Class Form1
'This would be for the initial http request
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
'Here's for the actual navigation event
Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
Label1.Text = "Loading " & TextBox1.Text
End Sub
'Here's after the navigation is done for the web request
Private Sub WebBrowser1_Navigated(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
Label1.Text = "Done"
End Sub
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.
Re: Need help with my web browser
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
Re: [RESOLVED] Need help with my web browser
Very nice :) good to see another beginning inspired programmer out there. And no problem
Re: Need help with my web browser
Quote:
Originally Posted by
AceInfinity
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?
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.