delphi 自动滚动到最底端scroll

自动滚动到最底端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;

来自为知笔记(Wiz)

delphi 自动滚动到最底端scroll,布布扣,bubuko.com

时间: 2024-10-10 15:20:24

delphi 自动滚动到最底端scroll的相关文章

基于JQuery实现滚动到页面底端时自动加载更多信息

基于JQuery实现滚动到页面底端时自动加载更多信息 关键代码: 代码如下: var stop=true; $(window).scroll(function(){ totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); if($(document).height() <= totalheight){ if(stop==true){ stop=false; $.post("ajax.

判断滚动条是否滚动到最底端

条件: $("div")[0].scrollTop + $("div").height() == $("div")[0].scrollHeight 完整滚动事件: var nScrollHight = 0;  var nScrollTop = 0; var nDivHight = $(".div").height(); $(".div").scroll(function() {       nScrollH

使用scrollpagination实现页面底端自动加载无需翻页功能

当阅读到页面最底端的时候,会自动显示一个"加载中"的功能,并自动从服务器端无刷新的将内容下载到本地浏览器显示. 这样的自动加载功能是如何实现的?jQuery的插件 ScrollPagination 可以帮助实现这个功能. 这里是ScrollPagination 功能的原型化代码, $(function() { $('#content').scrollPagination({ 'contentPage': 'democontent.html', // the page where you

让DIV的滚动条自动滚动到最底部 - 3种方法

要制作一个在线聊天的程序,在做最后的修饰时,需要对获得的信息即时滚动以保证用户总能看到最新消息. 聊天程序是基于AJAX设计的,没有用框架,消息容器是一个DIV,所以问题就在于如何控制DIV的滚动条. 但同样的代码拿到我这里却完全失效,又仔细查了下资料说XHTML标准下scrollTop的值恒为0,解决办法是使用 document.documentElement.scrollTop代替document.body.scrollTop,讲了半天所解决的是整个页 面的滚动条.这个方法我是用不了了,因为

自动滚动的Textview

又到了写博博的时候了!大家还好吧! 开始做机顶盒了,所以这里就有很多的界面需要做成一个自动化的界面.因为遥控盒手机触摸毕竟不一样咯!这里而且要方便大众的视觉体验的话,我们必须要考虑到这些因素.当然,我觉着,这次的自动滚动效果一定对大家也很有帮助的哦! 我们只要写一个类来继承我布局文件里面写的一个TextView就ok啦. package com.example.myscroltextview.view; import java.util.ArrayList; import android.con

C# ListBox 自动滚动到底部 方法:

在ListBox中添加一条记录(ListBox.Items.Add方法)后,滚动条会自动回到顶部.我们可能更希望它自动滚动到底部,简要介绍几种方法. 方法一: 1 this.listBox1.Items.Add("new line"); 2 this.listBox1.SelectedIndex = this.listBox1.Items.Count - 1; 3 this.listBox1.SelectedIndex = -1; 在添加记录后,先选择最后一条记录,滚动条会自动到底部,

课堂笔记-----页面的自动滚动效果

页面的自动滚动效果,可由javascript来实现, 但是有一个html标签 - <marquee></marquee>可以实现多种滚动效果,无需js控制. 使用marquee标记不仅可以移动文字,也可以移动图片,表格等. 语法:<marquee >...</marquee>: 说明:在标记之间添加要进行滚动的内容. 重要属性: 1.滚动方向direction(包括4个值:up. down. left和 right) 语法:<marquee direc

[原创]DELPHI木马DIY之生成服务端

文章作者:上帝的禁区信息来源:邪恶八进制信息安全团队(www.eviloctal.com)DELPHI木马DIY之生成服务端   我在这里就生成简单的服务端,为什么不先讲服务端的隐藏?因为我觉得生成服务端要好理解一点,简单一点,我们就由浅入深吧,OK,LET'S GO.   网络上其他的生成服务端的方式我不是很清楚,我就用我的方法来和大家讲解(不过还是先声明,我的方法亦是来自于网络,如果和谁的方法相同,请不要说我侵犯版权,因为我也不知道原作者是谁了,我这文章不作商业用途,如果有朋友认为我侵犯了他

Android自动滚动 轮播循环的ViewPager

主要介绍如何实现ViewPager自动播放,循环滚动的效果及使用.顺便解决ViewPager嵌套(ViewPager inside ViewPager)影响触摸滑动及ViewPager滑动速度设置问题. 项目已开源Android Auto Scroll [email protected],欢迎star和fork. 示例APK可从这些地址下载:Google Play,  360手机助手,  百度手机助手,  小米应用商店,  豌豆荚 示例代码地址见AutoScrollViewPagerDemo,效