delphi TWebbrowser打开paypal出错  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi TWebbrowser打开paypal出错


直接nevigate打开https://www.paypal.com
出现invalid floating point operation的错误,同时页面中的连接就无法再在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事件里

推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.038043975830078 seconds