Frmupdate = Class (tform, ibindstatuscallback)
Imgtop: timage;
Lbltop: tlabel;
Spdbtnclose: tspeedbutton;
Bevel1: tbevel;
Plstatus: tpanel;
PLINFO: tpanel;
Btncancel: tflatspeedbutton;
Tmrudapte: ttimer;
Plprogress: tpanel;
Procedure tmrudaptetimer (Sender: tobject );
Procedure btncancelclick (Sender: tobject );
Procedure formpaint (Sender: tobject );
Procedure imgtopmousemove (Sender: tobject; shift: tshiftstate; X, Y: integer );
Procedure spdbtncloseclick (Sender: tobject );
Private
Function onstartbinding (dwreserved: DWORD; PIB: ibinding): hresult; stdcall;
Function getpriority (Out npriority): hresult; stdcall;
Function onlowresource (Reserved: DWORD): hresult; stdcall;
Function onprogress (ulprogress, ulprogressmax, ulstatuscode: ulong; szstatustext: lpcwstr): hresult; stdcall;
Function onstopbinding (hresult: hresult; szerror: lpcwstr): hresult; stdcall;
Function getbindinfo (Out grfbindf: DWORD; var bindinfo: tbindinfo): hresult; stdcall;
Function ondataavailable (grfbscf: DWORD; dwsize: DWORD; formatetc: pformatetc; stgmed: pstgmedium): hresult; stdcall;
Function onobjectavailable (const IID: tguid; punk: iunknown): hresult; stdcall;
Function gethtmlfile (URL, filename: string): hresult;
Public
{Public declarations}
End;
//------------------------------------------------------------------------------
Function tfrmupdate. gethtmlfile (URL, filename: string): hresult;
VaR
Status: ibindstatuscallback;
Begin
Status: = ibindstatuscallback (Self );
Result: = urldownloadtofile (nil, pchar (URL), pchar (filename), 0, status );
End;
//------------------------------------------------------------------------------
Function tfrmupdate. getbindinfo (Out grfbindf: DWORD;
VaR bindinfo: tbindinfo): hresult;
Begin
Result: = e_notimpl;
End;
//------------------------------------------------------------------------------
Function tfrmupdate. getpriority (Out npriority): hresult;
Begin
Result: = e_notimpl;
End;
//------------------------------------------------------------------------------
Function tfrmupdate. ondataavailable (grfbscf, dwsize: DWORD;
Formatetc: pformatetc; stgmed: pstgmedium): hresult;
Begin
Result: = e_notimpl;
End;
//------------------------------------------------------------------------------
Function tfrmupdate. onlowresource (Reserved: DWORD): hresult;
Begin
Result: = e_notimpl;
End;
//------------------------------------------------------------------------------
Function tfrmupdate. onobjectavailable (const IID: tguid;
Punk: iinterface): hresult;
Begin
Result: = e_notimpl;
End;
//------------------------------------------------------------------------------
Function tfrmupdate. onstartbinding (dwreserved: DWORD;
PIB: ibinding): hresult;
Begin
Result: = e_notimpl;
End;
//------------------------------------------------------------------------------
Function tfrmupdate. onstopbinding (hresult: hresult;
Szerror: lpcwstr): hresult;
Begin
Result: = e_notimpl;
End;
Http://www.applevb.com