Lanc1988 Posted November 28, 2003 Posted November 28, 2003 I am looking for the code to make a built in web browser for my program. It needs to have an address bar, go button, back and forward buttons. Also if the code requires any tools from the toolbox such as a textbox etc.. please post them. Thanks in advance. Quote
*Experts* mutant Posted November 28, 2003 *Experts* Posted November 28, 2003 If you want to make your own browser from scratch then you are in for some time of coding :). Instead you could use the Browser component that works with IE. Go to your toolbox, click on Add/Remove components, go to COM Components and look for Microsoft WebBrowser control. Then with that, you can easily implement your own Next, Back, etc. buttons using the methods the control provides. Quote
Lanc1988 Posted November 30, 2003 Author Posted November 30, 2003 Ok, that helped alot, but i have one major problem. Whats the code to set the page it goes to? Quote
*Experts* mutant Posted November 30, 2003 *Experts* Posted November 30, 2003 browserobject.Navigate("url of the page") Quote
Lanc1988 Posted November 30, 2003 Author Posted November 30, 2003 It works perfectly except for one small problem, you have to click the browser window for the page to load? Do you know the code to fix that? Quote
*Experts* mutant Posted November 30, 2003 *Experts* Posted November 30, 2003 It should work fine without clicking. Are you sure that you have to click it for the page to load? Quote
Lanc1988 Posted November 30, 2003 Author Posted November 30, 2003 Yeah.. i let it sit for like 30 sec. and it never loaded, so i clicked the Browser window and it loaded right away. :S I had to change 'browserobject' to 'AxWebBrowser1', did that matter? Quote
*Experts* mutant Posted November 30, 2003 *Experts* Posted November 30, 2003 Well, that was just an example of how the actual browser object could be called, in your case AxWebBrowser1. :) Quote
Lanc1988 Posted November 30, 2003 Author Posted November 30, 2003 so, any ideas why it wont load without clicking it? Quote
Lanc1988 Posted November 30, 2003 Author Posted November 30, 2003 can something be added to it so it will click by itself or maybe like "loadpage" could be added to the code? Quote
Lanc1988 Posted November 30, 2003 Author Posted November 30, 2003 Ok, i found out the problem.. but im not sure how to fix it. Here is what happens, I am using Tab Control, and if I use the browser in one of the tabs, you have to click the browser window for the site to load in it. But if the browser is on a form and not in the tab section, it will load without having to be clicked. So can anyone help me with this? For some reason it waits for a click when its in a tab before it will load :S Quote
Lanc1988 Posted December 1, 2003 Author Posted December 1, 2003 nevermind everyone, i have found out the problem to this. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.