用dephi制作了一个简易的浏览器,
觉得滚动条太难看了,
想去掉,
请问有什么办法呢?

解决方案 »

  1.   


    WebBrowser1.oleobject.Document.body.Scroll := 'no';
      

  2.   

    先谢谢了,
    我水平太菜,还是不明白怎样用,
    一插入“WebBrowser1.oleobject.Document.body.Scroll := 'no';”这句代码就报错,
    再帮我看一下好吗?
    我的原代码如下
    unit Unit1;interfaceuses
      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';”放在哪个位置才行呢?
      

  3.   

    放在WebBrowser 控件的OnDocumentComplete事件里也可以的。
      

  4.   

    WebBrowser1.oleobject.Document.body.Scroll := 'no';