Delphi is multi purposes programming, sometime I use it to open internet banking such as KLIKBCA, Bank Mandiri and Bank BNI. We can open website from delphi, by use component TwebBrowser. This example I use delphi 7

OK.. next we go to the source
this step by step
- create new project application
- add two labels components
- add two edit components
- add tbutton and change the caption with Login
- add Twebbrowser from Internet Pallet
- on button click write this codes
procedure TForm1.Button1Click(Sender: TObject);
begin
WebBrowser1.Navigate('https://login.yahoo.com/config/login_verify2?&.src=ym');
while WebBrowser1.ReadyState <> READYSTATE_COMPLETE do application.processmessages;
WebBrowser1.OleObject.document.forms.item(0).elements.item('login').value:=edit1.Text;
WebBrowser1.OleObject.document.forms.item(0).elements.item('passwd').value:=edit2.Text;
webbrowser1.OleObject.document.forms.item('login_form').submit;
end;
source code
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw;
type
TForm1 = class(TForm)
WebBrowser1: TWebBrowser;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
WebBrowser1.Navigate('https://login.yahoo.com/config/login_verify2?&.src=ym');
while WebBrowser1.ReadyState <> READYSTATE_COMPLETE do application.processmessages;
WebBrowser1.OleObject.document.forms.item(0).elements.item('login').value:=edit1.Text;
WebBrowser1.OleObject.document.forms.item(0).elements.item('passwd').value:=edit2.Text;
webbrowser1.OleObject.document.forms.item('login_form').submit;
end;
end.
source dfm
object Form1: TForm1
Left = 192
Top = 124
Width = 702
Height = 514
Caption = 'Yahoo Mail & Delphi'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 24
Top = 32
Width = 45
Height = 13
Caption = 'Yahoo ID'
end
object Label2: TLabel
Left = 24
Top = 64
Width = 46
Height = 13
Caption = 'Password'
end
object WebBrowser1: TWebBrowser
Left = 0
Top = 144
Width = 686
Height = 332
Align = alBottom
TabOrder = 0
ControlData = {
4C000000E6460000502200000000000000000000000000000000000000000000
000000004C000000000000000000000001000000E0D057007335CF11AE690800
2B2E126208000000000000004C0000000114020000000000C000000000000046
8000000000000000000000000000000000000000000000000000000000000000
00000000000000000100000000000000000000000000000000000000}
end
object Edit1: TEdit
Left = 80
Top = 32
Width = 121
Height = 21
TabOrder = 1
end
object Edit2: TEdit
Left = 80
Top = 64
Width = 121
Height = 21
PasswordChar = '*'
TabOrder = 2
end
object Button1: TButton
Left = 80
Top = 96
Width = 75
Height = 25
Caption = 'Login'
TabOrder = 3
OnClick = Button1Click
end
end
link download source
http://www.ziddu.com/download/18579550/yahoomail.rar.html

