易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi中WebBrowser自动填表模板

unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,MSHTML, SHDOCVW,IdGlobal;
type
  TMainFrm = class(TForm)
    btnTest: TButton;
    edURL: TEdit;
    Label1: TLabel;
    procedure btnTestClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  MainFrm: TMainFrm;
implementation
{$R *.dfm}
procedure FillIEForm(aURL:string);
  procedure DoWithHtmlElement(aElementCollection:IHTMLElementCollection);
  var
    k:integer;
    vk:oleVariant;
    Dispatch: IDispatch;
    HTMLInputElement:IHTMLInputElement;
    HTMLSelectElement:IHTMLSelectElement;
    HTMLOptionElement: IHTMLOptionElement;
    HTMLTextAreaElement: IHTMLTextAreaElement;
    HTMLFormElement:IHTMLFormElement;
    HTMLOptionButtonElement:IHTMLOptionButtonElement;
  begin
    for k:=0 to aElementCollection.length -1 do
    begin
      Vk:=k;
      Application.ProcessMessages;
      Dispatch:=aElementCollection.item(Vk,0);
      if Succeeded(Dispatch.QueryInterface(IHTMLInputElement,HTMLInputElement)) then
      begin
        With HTMLInputElement do//单行文本
        begin
          if (UpperCase(Type_)='TEXT') or (UpperCase(Type_)='PASSWORD') then
          begin
            value:='text';
   


相关文档:

如何让Delphi调用外部程序并等待其运行信息(如结束)

函数一:
view plaincopy to clipboardprint?
uses 
    Windows,  
    SysUtils,  
    Classes,  
    ShellAPI;  
function RunAndWait(FileName: string; Visibility: Integer): THandle;&nbs ......

Delphi中用ADO连接数据库

此文适合Delphi新手阅读,特别是连接数据库方面还一懂半懂甚至根本不懂的新手;
     --------------------------但总体显得有点乱-------------------------
     本文章以Delphi 7和SQL Server 2000为例,控件名均为系统默认,如Unit1,DataModule1,Edit1,ADOCommand1,ADODataS ......

delphi DataSnap巢状主从表实现

服务端:添加ADOConnection,ADOQuery1,ADOQuery2。设置ADOQuery1为主表,ADOQuery2为从表。(通过  ADOQuery2.SQL.Text:= 'select * from 从表 where FKID=:主表PKID'设置)。添加DataSetProvider1和DataSetProvider2分别连接到ADOQuery1和ADOQuery2。
客户端:添加ClientDataSet1,ClientDataSet2。ClientDataS ......

Delphi常用控件命名规范

 常用控件命名前缀
控件类名
前缀
TForm等窗体类 
frm
TButton, TSpeedButton等所有的按钮类 
btn
TCheckBox等所有的检查框 
chk
TRadioButton单选按钮类
rdo
TListBox等所有的列表框类 
lst
TPanel等所有的面板类
pnl
TLabel, TStaticText等所有用来显示的标签类 
lbl
TE ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号