TWebBrowser 异常 invalid floating point operation

TWebbrowse加载 html文件出错,打开 某种网址出错。

直接nevigate打开https://www.paypal.com
出现的错误,同时页面中的连接就无法再在tWEBbrowser中访问了.
有办法解决这个错误么

unit UnIT1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, SHDocVw;

type
  TForm1 = class(TForm)
    WebBrowser1: TWEBBrowser;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
try
  WEBBrowser1.Navigate('https://www.paypal.com');
except

end;
end;

end.

大概的情况是,在使用一些浮点操作时,微软默认设计会抛出一系列的异常.这些异常按理说不应该阻止程序运行.但不知道为什么,

Delphi默认是截获后又把异常抛了出来,被系统截获就会影响程序运行了

borland给的解决方法是,加一句Set8087CW(Longword($133f));来关闭这个机制. 你可以加在form的oncreate事件里

原文地址:https://www.cnblogs.com/linyawen/p/2159177.html