谢谢楼上的各位朋友了[
]
我查资料看到也是说要用
WebBrowser1.oleobject.Document.body.Scroll := 'no';
但我加入这句代码后就会报错,
再帮我看一下好吗?
我的原代码如下
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, ToolWin, ComCtrls, ExtCtrls, WinSkinData, ImgList,
OleCtrls, SHDocVw, StdCtrls, shellapi,AppEvnts;
type
TForm1 = class(TForm)
ImageList1: TImageList;
SkinData1: TSkinData;
WebBrowser1: TWebBrowser;
ToolBar1: TToolBar;
ToolButton7: TToolButton;
ToolButton8: TToolButton;
ApplicationEvents1: TApplicationEvents;
procedure FormCreate(Sender: TObject);
procedure ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Navigate('http://www.163.com');
end;
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if (Msg.Message = WM_RBUTTONDOWN) or (Msg.Message = WM_RBUTTONDBLCLK) then
begin
if IsChild(Webbrowser1.Handle, Msg.hwnd) then
begin
ShowMessage('感谢您使用简易浏览器');
Handled := True;
end;
end;
end;
end.
要把“WebBrowser1.oleobject.Document.body.Scroll := 'no';”放在哪个位置才行呢?