IdHTTP avec les thèmes provoque une exception
bonjour,
J'utilise Delphi XE5.
Pour mettre mon problème en évidence, j'ai fait une appli qui ne possède qu'un objet TIdHttp et un bouton qui faire une requête IdHttp1.get('http://www.crystalxe.com');
Lorsque je sélectionne le thème windows, ça fonctionne bien.
Par contre si je choisis un thème comme par exemple "Lavender classico" alors dès que j'appuie sur mon bouton, j'ai une exception "access violation at....read of address..."
Pour changer le thème je passe par le menu Projets / Options puis l'élément Application / apparence
Voici mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP;
type
TForm1 = class(TForm)
IdHTTP1: TIdHTTP;
ButtonGet: TButton;
procedure ButtonGetClick(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
//---------------------------------------------------------
procedure TForm1.ButtonGetClick(Sender: TObject);
Var
S : String;
begin
S := IdHttp1.get('http://www.crystalxe.com');
ShowMessage(S);
end;
//---------------------------------------------------------
end. |
Merci
Franck