[Delphi Tutorial] How to make a simple web browser

A Place For Programmers Of All Levels To Discuss Programming & Web Building.

Moderator: Community Moderator

Post Reply
User avatar
djfshady
Corporal
Corporal
Posts: 25
Joined: 26 Nov 2010, 20:12
Location: United Kingdom
Been thanked: 5 times
Contact:

[Delphi Tutorial] How to make a simple web browser

Post by djfshady »

If you are going to post this tutorial anywhere else remember to give credits.

In this tutorial ill show you how to create a simple delphi webbrowser.

What you will need:
1 Editbox
5 Buttons
1 Webbrowser

First you will need to add 1 editbox which can be found here:
Image

Next you will need to add 5 Buttons:
Image

Now rename each button to these:

Button1 = Back
Button2 = Forward
Button3 = Refresh
Button4 = Stop
Button5 = Go

We will now add the webbrowser which is found here:
Image

The program will look similar to this:
Image

now its time to start coding.

Double click on Button1 (Back) and add in this:

Code: Select all

webbrowser1.goback;
Double click on Button2 (Forward) and add this:

Code: Select all

webbrowser1.GoForward;
Double click on Button3 (Refresh) and add this:

Code: Select all

webbrowser1.Refresh;
Double click on Button4 (Stop) and add this:

Code: Select all

webbrowser1.stop;
Double click on Button5 (Go) and add this:

Code: Select all

webbrowser1.navigate(edit1.text);
Once you have done all that its now time to test the program.

To test your program you can click the green triangle here:
Image

Or just press F9

Now the finished result will look similar to this:
Image

Hope you enjoyed my tutorial :)
Image
Post Reply

Return to “Programming/Web Building Chat & Support”