TOleControl(WebBrowser1).Visible := False 这样就可以隐藏浏览器控件

TOleControl(WebBrowser1).Visible := False 这样就可以隐藏浏览器控件了。
---------------------------------------------- 
RTC三层技术交流,QQ:64445322
作者:    
男 crystalmoon (黑夜杀手)    ▲▲▲▲▲    -
盒子活跃会员
2017-4-13 14:14:44
8楼:    sorry,我上面的3个发贴有问题,7楼的对,我只看了一下我原来的测试demo里是 写的 webbrowser.visible 和楼主一样,以为就没问题,现在7楼说了后,我又翻了一下我的demo,发现我的demo中的wb是从webbrowser继承过来的,里面对visible属性有调整过。这是我类里的属性写法,给你参考一下。

procedure TCrystalWebBrowser.SetVisible(const Value: Boolean);
begin
  FVisible := Value;
  if FVisible then
    ShowWindow(Self.Handle, SW_SHOW)
  else
    ShowWindow(Self.Handle, SW_HIDE);
end;
---------------------------------------------
原文地址:https://www.cnblogs.com/CodeGear/p/6704225.html