• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

delphi自动滚动到最底端scroll

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

自动滚动到最底端scroll

Uses MSHTML;
{$R *.dfm}
var
  ScrollPos: integer=0;
procedure TForm1.Button1Click(Sender: TObject);
begin
  inc(ScrollPos, 10);
  if WebBrowser1.Document <> nil then
    (WebBrowser1.Document as IHTMLDocument2).parentWindow.scroll(0,ScrollPos);
end;
 
 
 
 
 
// *********************************************************************//
// Interface: IHTMLWindow2
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {332C4427-26CB-11D0-B483-00C04FD90119}
// *********************************************************************//
  IHTMLWindow2 = interface(IHTMLFramesCollection2)
    ['{332C4427-26CB-11D0-B483-00C04FD90119}']
    function Get_frames: IHTMLFramesCollection2; safecall;
    procedure Set_defaultStatus(const p: WideString); safecall;
    function Get_defaultStatus: WideString; safecall;
    procedure Set_status(const p: WideString); safecall;
    function Get_status: WideString; safecall;
    function setTimeout(const expression: WideString; msec: Integer; var language: OleVariant): Integer; safecall;
    procedure clearTimeout(timerID: Integer); safecall;
    procedure alert(const message: WideString); safecall;
    function confirm(const message: WideString): WordBool; safecall;
    function prompt(const message: WideString; const defstr: WideString): OleVariant; safecall;
    function Get_Image: IHTMLImageElementFactory; safecall;
    function Get_location: IHTMLLocation; safecall;
    function Get_history: IOmHistory; safecall;
    procedure close; safecall;
    procedure Set_opener(p: OleVariant); safecall;
    function Get_opener: OleVariant; safecall;
    function Get_navigator: IOmNavigator; safecall;
    procedure Set_name(const p: WideString); safecall;
    function Get_name: WideString; safecall;
    function Get_parent: IHTMLWindow2; safecall;
    function open(const url: WideString; const name: WideString; const features: WideString; 
                  replace: WordBool): IHTMLWindow2; safecall;
    function Get_self: IHTMLWindow2; safecall;
    function Get_top: IHTMLWindow2; safecall;
    function Get_window: IHTMLWindow2; safecall;
    procedure navigate(const url: WideString); safecall;
    procedure Set_onfocus(p: OleVariant); safecall;
    function Get_onfocus: OleVariant; safecall;
    procedure Set_onblur(p: OleVariant); safecall;
    function Get_onblur: OleVariant; safecall;
    procedure Set_onload(p: OleVariant); safecall;
    function Get_onload: OleVariant; safecall;
    procedure Set_onbeforeunload(p: OleVariant); safecall;
    function Get_onbeforeunload: OleVariant; safecall;
    procedure Set_onunload(p: OleVariant); safecall;
    function Get_onunload: OleVariant; safecall;
    procedure Set_onhelp(p: OleVariant); safecall;
    function Get_onhelp: OleVariant; safecall;
    procedure Set_onerror(p: OleVariant); safecall;
    function Get_onerror: OleVariant; safecall;
    procedure Set_onresize(p: OleVariant); safecall;
    function Get_onresize: OleVariant; safecall;
    procedure Set_onscroll(p: OleVariant); safecall;
    function Get_onscroll: OleVariant; safecall;
    function Get_document: IHTMLDocument2; safecall;
    function Get_event: IHTMLEventObj; safecall;
    function Get__newEnum: IUnknown; safecall;
    function showModalDialog(const dialog: WideString; var varArgIn: OleVariant; 
                             var varOptions: OleVariant): OleVariant; safecall;
    procedure showHelp(const helpURL: WideString; helpArg: OleVariant; const features: WideString); safecall;
    function Get_screen: IHTMLScreen; safecall;
    function Get_Option: IHTMLOptionElementFactory; safecall;
    procedure focus; safecall;
    function Get_closed: WordBool; safecall;
    procedure blur; safecall;
    procedure scroll(x: Integer; y: Integer); safecall;
    function Get_clientInformation: IOmNavigator; safecall;
    function setInterval(const expression: WideString; msec: Integer; var language: OleVariant): Integer; safecall;
    procedure clearInterval(timerID: Integer); safecall;
    procedure Set_offscreenBuffering(p: OleVariant); safecall;
    function Get_offscreenBuffering: OleVariant; safecall;
    function execScript(const code: WideString; const language: WideString): OleVariant; safecall;
    function toString: WideString; safecall;
    procedure scrollBy(x: Integer; y: Integer); safecall;
    procedure scrollTo(x: Integer; y: Integer); safecall;
    procedure moveTo(x: Integer; y: Integer); safecall;
    procedure moveBy(x: Integer; y: Integer); safecall;
    procedure resizeTo(x: Integer; y: Integer); safecall;
    procedure resizeBy(x: Integer; y: Integer); safecall;
    function Get_external: IDispatch; safecall;
    property frames: IHTMLFramesCollection2 read Get_frames;
    property defaultStatus: WideString read Get_defaultStatus write Set_defaultStatus;
    property status: WideString read Get_status write Set_status;
    property Image: IHTMLImageElementFactory read Get_Image;
    property location: IHTMLLocation read Get_location;
    property history: IOmHistory read Get_history;
    property opener: OleVariant read Get_opener write Set_opener;
    property navigator: IOmNavigator read Get_navigator;
    property name: WideString read Get_name write Set_name;
    property parent: IHTMLWindow2 read Get_parent;
    property self: IHTMLWindow2 read Get_self;
    property top: IHTMLWindow2 read Get_top;
    property window: IHTMLWindow2 read Get_window;
    property onfocus: OleVariant read Get_onfocus write Set_onfocus;
    property onblur: OleVariant read Get_onblur write Set_onblur;
    property onload: OleVariant read Get_onload write Set_onload;
    property onbeforeunload: OleVariant read Get_onbeforeunload write Set_onbeforeunload;
    property onunload: OleVariant read Get_onunload write Set_onunload;
    property onhelp: OleVariant read Get_onhelp write Set_onhelp;
    property onerror: OleVariant read Get_onerror write Set_onerror;
    property onresize: OleVariant read Get_onresize write Set_onresize;
    property onscroll: OleVariant read Get_onscroll write Set_onscroll;
    property document: IHTMLDocument2 read Get_document;
    property event: IHTMLEventObj read Get_event;
    property _newEnum: IUnknown read Get__newEnum;
    property screen: IHTMLScreen read Get_screen;
    property Option: IHTMLOptionElementFactory read Get_Option;
    property closed: WordBool read Get_closed;
    property clientInformation: IOmNavigator read Get_clientInformation;
    property offscreenBuffering: OleVariant read Get_offscreenBuffering write Set_offscreenBuffering;
    property external: IDispatch read Get_external;
  end;





鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Delphi获取计算机名,IP地址,登录用户。发布时间:2022-07-18
下一篇:
pickupword'sshapesforDelphi发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap