Built In Web Browser

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
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.
 
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.
 
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?
 
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?
 
can something be added to it so it will click by itself or maybe like "loadpage" could be added to the code?
 
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
 
Back
Top