delphi Ïòwebbrowser´ò¿ªµÄÍøÒ³ÖвåÈëjsÃüÁî
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw, ExtCtrls,MSHTML;
type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Edit1: TEdit;
Button1: TButton;
WebBrowser1: TWebBrowser;
WebBrowser2: TWebBrowser;
Button2: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure WebBrowser1NewWindow2(Sender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool);
procedure WebBrowser2BeforeNavigate2(Sender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
webbrowser1.Navigate(edit1.Text );
end;
procedure TForm1.WebBrowser1NewWindow2(Sender: TObject;
var ppDisp: IDispatch; var Cancel: WordBool);
begin
ppDisp := WebBrowser2.Application;
end;
procedure TForm1.WebBrowser2BeforeNavigate2(Sender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
begin
WebBrowser1.Navigate(string(URL)); // ÔÙÖ¸»ØWebBrowser1
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
(WebBrowser1.Document as IHTMLDocument2).parentWindow.execScript(
memo1.text, 'javascript')
end;
procedure TForm1.FormCreate(Sender: TObje
Ïà¹ØÎĵµ£º
Delphi Óë C/C++ Êý¾ÝÀàÐͶÔÕÕ±í
DelphiÊý¾ÝÀàÐÍC/C++
ShorInt
8λÓзûºÅÕûÊý
char
Byte
8λÎÞ·ûºÅÕûÊý
BYTE,unsigned short
SmallInt
16λÓзûºÅÕûÊý
short
Word
16λÎÞ·ûºÅÕûÊý
unsigned short
Integer,LongInt
32λÓзûºÅÕûÊý
int,long
Cardinal,LongWord/DWORD
32λÎÞ·ûºÅÕûÊý
unsigned long
Int6 ......
ÔÚDELPHIΪ±à³ÌÕßÌṩÁËÒ»¸öÁé»îµÄ»æͼ³¡Ëù,¼´±¾ÎÄËùÊöµÄ
CANVASÀà,ÔÚDELPHIÖеĺܶà¿Ø¼þ¶¼¾ßÓдËÊôÐÔ,ʹ±à³ÌÕß¿ÉÒÔ
ÔÚÕâЩµÄ¿Ø¼þµÄ±íÃæËæÐÄËùÓûµÄ»æͼ,Õâ¶ÔÍêÉÆÓû§½çÃæ»òÕßÖÆ
×÷һЩÆÁÄ»Ìؼ¼¶¼ÓÐ×Å·Ç·²µÄ×÷ÓÃ,ÏÂÃæ¾ÙÀý˵Ã÷¼¸ÖÖÌØÊâÆÁÄ»
......
Delphi ActiveX FormµÄʹÓÃʵÀý
By knityster
1. ActiveX¿Ø¼þ¼ò½é
ActiveX¿Ø¼þÒ²¾ÍÊÇÒ»°ãËù˵µÄOCX¿Ø¼þ£¬ËüÊÇActiveX¼¼ÊõµÄÒ»²¿·Ö¡£
ActiveX¿Ø¼þ¿ÉÒÔ±»¼¯³Éµ½ºÜ¶àÖ§³ÖActiveXµÄÓ¦Óõ±ÖÐÈ¥£¬»òÕßÖ±½ÓÓÃÀ´À©Õ¹Ó¦ÓõŦÄÜ£¬ÕâЩ֧³ÖActiveXµÄÓ¦ÓðüÀ¨C++ Builder¡¢Delphi¡¢Visual dBASE¡¢ Visual Basic¡¢Visual C++¡ ......
ÕâÀïÏÈ˵˵Á½¸ö¸ÅÄTheme(Ö÷Ìâ)ºÍ Visual Style ¡£Theme ×îÔç³öÏÖÔÚ Microsoft Plus! for Windows 95 ÖУ¬ÊÇ Windows ÖÐ Wallpaper¡¢Cursors¡¢Fonts¡¢Sounds ¡¢Icons µÈµÄÉèÖÃÖµ¼¯ºÏ¡£Visual Style ÔÚ Windows XP Öвű»ÒýÈ룬Visual Style ¹æ¶¨ÁË Contorls µÄÍâ¹Û£¬ÁíÍ⻹°üÀ¨Ê¹ÓÃÕâЩÍâ¹ÛµÄÒ»Ì× API ......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw;
t ......