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';
 
Ïà¹ØÎĵµ£º
º¯ÊýÒ»£º
view plaincopy to clipboardprint?
uses
Windows,
SysUtils,
Classes,
ShellAPI;
function RunAndWait(FileName: string; Visibility: Integer): THandle;&nbs ......
ÓÐʱÐèҪʹÓÃ͸Ã÷¿Ø¼þÓÃÓÚ²¶»ñÊó±êÏûÏ¢
1.µ÷ÓÃWindows2000,xpеÄAPIº¯ÊýʵÏÖÕâÒ»¹¦ÄܵĹý³Ì¡£Ê¹ÓÃSetLayeredWindowAttributes
2.Ö±½ÓÉèÖÿؼþµÄalphablend,alphablendvalue£¬¼ä½Óµ÷ÓÃÉÏÊöapi.
3.ʹÓÃTStaticText¿Ø¼þ
procedure WMCtrlColor(var Message: TWMCtlColor); message WM_CTLCOLOR;
procedure TForm3.WMCtr ......
Ò»¡¢ÀàºÍ¶ÔÏó
ÀàÊǶÔÏóµÄÀàÐÍ£¬ÊÇ´´½¨¶ÔÏóµÄÄ£°å¡£Ò»¸öÀà¿ÉÒÔ´´½¨¶à¸ö¶ÔÏ󣬶øÒ»¸ö¶ÔÏó×ÜÊÇÊôÓÚij¸öÀà¡£Àà¾ßÓÐÄÚ²¿µÄÊôÐÔ£¨×´Ì¬£©ºÍÐÐΪ£¨²Ù×÷£©¡£
¶ÔÏóÊÇÀàµÄʵÀý£¬¾ßÓÐÇø±ðÓÚͬÀàÆäËû¶ÔÏóµÄÊôÐÔ¼¯ºÏ¡£
¶ÔÏóµÄÉùÃ÷´æ·ÅÓÚ¶ÑÕ»£¬¶ÔÏóµÄÒýÓôæ·ÅÓÚ¶Ñ¡£
¶þ¡¢ÀàµÄ·½·¨·ÖÀà
1¡¢ ÆÕͨ·½·¨
²»¼ÓÈκÎÐÞÊε ......
³£ÓÿؼþÃüÃûǰ׺
¿Ø¼þÀàÃû
ǰ׺
TFormµÈ´°ÌåÀà
frm
TButton, TSpeedButtonµÈËùÓеİ´Å¥Àà
btn
TCheckBoxµÈËùÓеļì²é¿ò
chk
TRadioButtonµ¥Ñ¡°´Å¥Àà
rdo
TListBoxµÈËùÓеÄÁбí¿òÀà
lst
TPanelµÈËùÓеÄÃæ°åÀà
pnl
TLabel, TStaticTextµÈËùÓÐÓÃÀ´ÏÔʾµÄ±êÇ©Àà
lbl
TE ......
ÖÆ×÷Ô²½Ç¾ØÐεĴ°Ì壺
01.procedure TPortForm.FormCreate(Sender: Tobject);
02.var hr :thandle;
03.begin
04.hr:=createroundrectrgn(0,0,width,height,20,20);
05.setwindowrgn(handle,hr,true);
06.end;
Èç¹û²»Òª´°ÌåÍâ¿ò£¬ÔòʹÓãº
01.procedure TPortForm.FormCreate(Sender: Tobject);
02.var hr :thandl ......