Précédent   Forum des professionnels en informatique > Logiciels > Solutions d'entreprise > Business Intelligence > Crystal Reports
Crystal Reports Forum d'entraide sur Crystal Reports. Avant de poster --> FAQ Crystal, Tutoriels Crystal
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 24/07/2003, 10h16   #1
Membre éprouvé
 
Avatar de sur_uix
 
Inscription : mai 2002
Messages : 377
Détails du profil
Informations personnelles :
Localisation : Suisse

Informations forums :
Inscription : mai 2002
Messages : 377
Points : 471
Points : 471
Par défaut [TOPIC OFFICIEL] Comment utiliser le RDC de Crystal en Delphi ?

1er Partie importer le RDC en temps que composant VCL

Pour utiliser le RDC sous Delphi il faut l'importer (Le RDC n'est rien d'autre que des objets COM)

Pour ajouter le viewer : Component -> Import ActiveX control.... et la tu prend Crystal Report Viewer Control qui te donnera un TCRViewer.

Pour ajouter le moteur : Projet -> Import Type Library... et la tu prend Crystal Report ActiveX Designer Run Time Library qui te donnera entre autre un TApplication et un TReport.
Je te conseil de modifier le nom de toutes les classes P.Ex. TApplication en TCRApplication. Sinon certain classe du RDC seront en confli avec d'autre déjà existante dans Delphi.

Après cela tu aura entre autre deux nouveaux fichiers CRVIEWERLib_TLB.pas et CRAXDRT_TLB.pas.
Je te conseil d'aller te ballader un peux dedans pour voir de quoi il en retourne.
sur_uix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 24/07/2003, 10h32   #2
Membre éprouvé
 
Avatar de sur_uix
 
Inscription : mai 2002
Messages : 377
Détails du profil
Informations personnelles :
Localisation : Suisse

Informations forums :
Inscription : mai 2002
Messages : 377
Points : 471
Points : 471
2e Première utilisation.

Pour pouvoir fair un apérçu avec le RDC il nous faut au minimum 3 classes. TCRviewer - Pour l'apérçu, TCRReport - contient le rapport et TCRApplication - pour charger le raport.

Créer un projet Delphi vide avec une feuille FORM1
TCRViewer est c'est un composant visuel, on peut alors le placer sur FORM1 comme n'importe quel autre composant Delphi (DragAndDrop)

ON ajoute encore un bouton (Button1) avec une méthode sur l'évement onClick.

Maintenant voici comment on affiche un rapport :
On l'ouvre -> crReport := crApplication.OpenReport(FileName, crOpenReportByTempCopy);
On dit au viewer quel rapport il doit afficher -> crViewer91.ReportSource := crReport;
Et on affiche le rapport -> crViewer91.ViewReport;

Et voilà c'est fini.

Ceci donne le code suivant
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
unit Unit1;
 
interface
 
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, OleCtrls, CRVIEWER9Lib_TLB, CRAXDRT_TLB;
 
type
  TForm1 = class(TForm)
    CRViewer91: TCRViewer9;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
var
  Form1: TForm1;
  crApplication : IApplication;
 
implementation
uses COMOBJ;
{$R *.DFM}
 
procedure TForm1.Button1Click(Sender: TObject);
var
   CommonDialog : TOpenDialog;
   crReport : IReport;
begin
 
   CommonDialog := TOpenDialog.CREATE(Self);
   CommonDialog.Filter := 'Crystal Reports (*.rpt)|*.rpt';
   IF CommonDialog.Execute then begin
      try
         Cursor := crHourGlass;
         crReport := crApplication.OpenReport(CommonDialog.FileName, crOpenReportByTempCopy);
 
         //Any DATABASE logon, parameter FIELD, SELECT formula code would go here
 
         crViewer91.ReportSource := crReport;
         crViewer91.ViewReport;
         while crViewer91.IsBusy do begin
            //Delphi 6 may have a different object instead of 'forms'
            forms.Application.ProcessMessages;
         end;
         Cursor := crDefault;
 
         //After user IS done viewing report, release it
         crReport._Release;
      except
      ON E: EOLEException do ShowMessage (E.Message);
      end;
   end;
   CommonDialog.Free;
end;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
//Instantiate the one global reference TO the RDC Application object
crApplication := CreateOLEObject('CrystalRuntime.Application.9') AS IApplication;
end;
 
procedure TForm1.FormDestroy(Sender: TObject);
begin
//Release application object at close of project
crApplication._Release();
end;
 
end.
sur_uix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2003, 11h33   #3
Membre confirmé
 
Avatar de Djob
 
Inscription : août 2002
Messages : 215
Détails du profil
Informations forums :
Inscription : août 2002
Messages : 215
Points : 217
Points : 217
Salut,
Merci pour ce topic ,

J'ai essayé de compiler ,
J'ai tout d'abord eu une erreur sur CreateOLEObject (identificateur non déclaré), j'ai rajouté l'unité ComObj dans les uses

puis après l'erreur :

Types incompatibles : 'TCrApplication' et 'IApplication'

que dois faire ?
Djob est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2003, 13h42   #4
Membre éprouvé
 
Avatar de sur_uix
 
Inscription : mai 2002
Messages : 377
Détails du profil
Informations personnelles :
Localisation : Suisse

Informations forums :
Inscription : mai 2002
Messages : 377
Points : 471
Points : 471
C'est bizzard que tu ai ce message. TCRApplication et le wrappeur et IApplication ll'interface COM.

Sur quel ligne tu as l'erreur.
Est-ce que par hazard tu à changé ceci
Code :
crApplication : IApplication;
en ceci
Code :
crApplication : TCrApplication;
: :
Parce que cette exemple travaile directement sur l'interface.
sur_uix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2003, 14h17   #5
Membre confirmé
 
Avatar de Djob
 
Inscription : août 2002
Messages : 215
Détails du profil
Informations forums :
Inscription : août 2002
Messages : 215
Points : 217
Points : 217
C'est en effet une erreur de ma part ,...

J' ai posé les composants TCrApplication et TCrReport sur ma fiche au lieu d'ajouter un IApplication et un IReport ...

Merci bcp sur_uix.
Djob.
Djob est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/07/2003, 09h53   #6
Membre éprouvé
 
Avatar de sur_uix
 
Inscription : mai 2002
Messages : 377
Détails du profil
Informations personnelles :
Localisation : Suisse

Informations forums :
Inscription : mai 2002
Messages : 377
Points : 471
Points : 471
Ensuite beaucoup de demande on été faite pour pouvoir lier une image dynamiquement.
http://www.developpez.net/forums/viewtopic.php?t=102168
http://www.developpez.net/forums/viewtopic.php?t=66466

Pour cela Crystal nous propose quelque chose mais en VB :
Code :
1
2
3
4
5
6
7
8
9
10
11
 
This code applies TO Section Format Events IN a DSR. 
 
'Section 3 is the detail section
Private Sub Section3_Format(ByVal pFormattingInfo As Object)
 
  'Pass the path FROM field3 TO the Visual Basic LoadPicture FUNCTION. 
'The picture is then loaded into the OLE Object
Set Picture1.FormattedPicture = LoadPicture(Field3.Value)
 
End Sub
ON constate que Crystal à pensé à tout, car ce code n'est pas très compliqué.

IL faut :
1. Placer un objet OLE, appelé Picture1, dans un section, appelé Section3.
2. Traper l'événement Format de la Section du rapport.
3. Et dans l'événement Format, modifier l'objet Picture avec l'image qui se trouve sur votre disque. Par exemple :
Code :
1
2
3
4
SET Picture1.FormattedPicture = LoadPicture(Field3.Value)
 
Field3 pourait être un FormulaField qui retourne
"pic" + ToText({Hetype.Type,0}) + ".jpg"
Maintenat le plus compliqué c'est le point 2, car cela demande pas mal de notion COM en Delphi. Dans le fichier CRAXDRT_TLB.pas on a la section "ISection" et sont événement "ISectionEvent".
Il faut faire un wrappeur pour ces deux interface.
Voici ce que je vous propose :

Pour l'en-tête
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  TCrSectionFormat = procedure (Sender: TObject; const pFormattingInfo: IDispatch) of object;
 
  TCrSection = class(TOleServer)
   private
     FOnFormat : TCrSectionFormat;
     FIntf:        ISection;
     FUNCTION      GetDefaultInterface: ISection;
   protected
     procedure InitServerData; override;
     procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
   published
     property OnFormat: TCrSectionFormat READ FOnFormat WRITE FOnFormat;
   public
     constructor CREATE(AOwner: TComponent); override;
     destructor  Destroy; override;
     procedure Connect; override;
     procedure ConnectTo(svrIntf: ISection);
     procedure Disconnect; override;
     property  DefaultInterface: ISection READ GetDefaultInterface;
     property Intf:ISection READ FIntf;
  end;
Pour le coprs :

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ TCrSection }
 
procedure TCrSection.Connect;
var
  punk: IUnknown;
begin
  IF FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk AS ISection;
  end;
end;
 
procedure TCrSection.ConnectTo(svrIntf: ISection);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;
 
constructor TCrSection.CREATE(AOwner: TComponent);
begin
  inherited CREATE(AOwner);
end;
 
destructor TCrSection.Destroy;
begin
  inherited Destroy;
end;
 
procedure TCrSection.Disconnect;
begin
  IF Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;
 
FUNCTION TCrSection.GetDefaultInterface: ISection;
begin
  IF FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;
 
procedure TCrSection.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{AF3768D4-6120-4E28-96DD-63FD2DC27B7A}';
    IntfIID:   '{AF376806-6120-4E28-96DD-63FD2DC27B7A}';
    EventIID:  '{AF37684B-6120-4E28-96DD-63FD2DC27B7A}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;
 
procedure TCrSection.InvokeEvent(DispID: TDispID;
  var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
   1: IF Assigned(FOnFormat) then
            FOnFormat(Self, Params[0]);
  end; {case DispID}
end;

Vous ajouter cela dans le fichier CRAXDRT_TLB.pas
Maintenat vous avez une classe TCrSection qui ce connecte sur n'importe quel section du rapport et vous propose l'événement OnFormat(...)

Pour l'utiliser c'est simple :
Code :
1
2
3
  FRptSection := TCRSection.CREATE(nil);
  FRptSection.OnFormat := FormatOLE;
  FRptSection.ConnectTo(crReport.Sections.Get_Item('DetailSection1'));
FormatOLE est votre procedure qui serra appelé par l'événement onFormat. C'est la dedans que vous coderai le chargement de l'image.

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
var
  strPath : string;
  oPicture: TPicture;
  pd: IPictureDisp;
  oBitmap : TBitmap;
{...}
 
          oPicture := TPicture.CREATE;
          try
            oBitmap := LoadGraphicsFile(strPath);
            oPicture.Bitmap := oBitmap ;
            GetOLEPicture(oPicture, pd);
            Picture1.FormattedPicture := pd;
          finally
            oPicture.Free;
            oBitmap.Free;            
            oBitmap := nil;            
            pd := nil;
          end;
Voilà si vous voulez en savoir plus sur la création de la classe TCrsection, allez plutôt sur le forum Delphi.
Bonne chance
sur_uix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/07/2003, 22h31   #7
Membre confirmé
 
Avatar de Djob
 
Inscription : août 2002
Messages : 215
Détails du profil
Informations forums :
Inscription : août 2002
Messages : 215
Points : 217
Points : 217
ça marche vraiment très bien... !!! Y upi !!
et encore : x1000

(J'avais écumé sans succès, les forums pour trouver cette solution ..)

Maintenant, je vais essayer d'adapter cete solution sous C++ Builder..
( j'en ai besoin pour utiliser le toolkit C++ de Lotus...
Il semblerait que l 'installation du RDC sous Builder avec cette meme procedure pose quelques problemes de compilation chez moi...(erreurs dans le code généré, mais ça provient peut être de mon environnement ...)

et encore MERCI sur_uix !
Djob est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/07/2003, 08h56   #8
Membre éprouvé
 
Avatar de sur_uix
 
Inscription : mai 2002
Messages : 377
Détails du profil
Informations personnelles :
Localisation : Suisse

Informations forums :
Inscription : mai 2002
Messages : 377
Points : 471
Points : 471
Y a pas de quoi

Il y a encore un point sur lequel il faut être prudent, c'est la libération des interfaces. N'oublié pas de détruire correctement tout vos objects Crystal.

Si vous travaillé directement sur l'interface faite
Code :
1
2
FIReport.__Release;
FIReport := nil;
Et si vous utiliser une classe
Code :
1
2
3
FTCrReport.Intf.__Release;
FTCrReport.Free;
FTCrReport := nil;
C'est un des consultants de Crystal qui m'a dit de faire le __Release, au début je ne faisait que
Code :
1
2
3
 
FTCrReport.Free;
FTCrReport := nil;
Et j'avais des problèmes lorsque je quitais mon application.
Donc prudence.
Voilà amusez vous bien
sur_uix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/08/2003, 15h38   #9
Membre éprouvé
 
Avatar de sur_uix
 
Inscription : mai 2002
Messages : 377
Détails du profil
Informations personnelles :
Localisation : Suisse

Informations forums :
Inscription : mai 2002
Messages : 377
Points : 471
Points : 471
Hello tout le monde il y aura bientôt un FAQ de ce topic dans la FAQ de Delphi.
sur_uix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/09/2005, 09h07   #10
Invité régulier
 
Inscription : septembre 2005
Messages : 39
Détails du profil
Informations forums :
Inscription : septembre 2005
Messages : 39
Points : 8
Points : 8
kikoo je suis en VB.Net et je voi pas dutous ou je peu implementer du code dans le crystal report

je n'ai acces qu'a : CrystalReport1.rpt ou a CrystalReport1.vb(lorsque je fait afficher tous les fichiers) dans le second ya du code mais je ne voi pas ou je peu implementer koi que ce soit

qu'elle qu'un peu m aider avec VB.Net ??

je ne voi pas ou je peu choper : CRAXDRT_TLB.pas.
dankes est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/11/2007, 19h07   #11
Invité de passage
 
Inscription : décembre 2005
Messages : 37
Détails du profil
Informations forums :
Inscription : décembre 2005
Messages : 37
Points : 2
Points : 2
Par défaut crystal + delphi

bonjour à tous j'ai essayé la procédure citée tout en haut pour lancer un état crée sous crystal reports 11 mais j'arrive pas à trouver les ActiveX que tu as cité tu peux bien m'expliquer si tu le permettais et merci.
zwina2004 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/12/2009, 12h24   #12
Invité de passage
 
Patrick Parijs
Inscription : décembre 2009
Messages : 1
Détails du profil
Informations personnelles :
Nom : Patrick Parijs

Informations forums :
Inscription : décembre 2009
Messages : 1
Points : 1
Points : 1
Bonjour à tous,

J'ai lu avec beaucoup d'intéret l'article de sur_uix concernant la méthode pour pouvoir lier une image dynamiquement en Crystal Reports avec le RDC.

Je suis en train d'adapter cette méthode avec Crystal Reports 8.0 et Delphi 2007. J'ai fait tous qui est nécessaire (installation de CRViewerlib_tlb.pas et CRAXDRT_tlb.pas), mais le problème c'est que l' événement Format ("Onformat") ne se produit pas ?! Je pense que l' événement se produit dès qu'on commence avec l' affichage du rapport (CRViewer.Viewreport) ?

La procédure qui serra appelé par l' événement "OnFormat", je l'ai declaré comme :
Code :
procedure TForm1.FormatDetailSection4(Sender : TObject ; const pFormattingInfo: IDispatch);
et la déclaration de la section dans l' événement "FormCreate" :
Code :
1
2
3
 FRptSection := TCRSection.CREATE(nil);
 FRptSection.OnFormat := Form1.FormatDetailSection4;
 FRptSection.ConnectTo(CRReport.Sections[4]);
J' espère que c'est juste ou est-ce que j'ai fait des erreurs ?

Merçi en avance pour m'aider ...



Citation:
Envoyé par sur_uix Voir le message
Ensuite beaucoup de demande on été faite pour pouvoir lier une image dynamiquement.
http://www.developpez.net/forums/viewtopic.php?t=102168
http://www.developpez.net/forums/viewtopic.php?t=66466

Pour cela Crystal nous propose quelque chose mais en VB :
Code :
1
2
3
4
5
6
7
8
9
10
11
 
This code applies TO Section Format Events IN a DSR. 
 
'Section 3 is the detail section
Private Sub Section3_Format(ByVal pFormattingInfo As Object)
 
  'Pass the path FROM field3 TO the Visual Basic LoadPicture FUNCTION. 
'The picture is then loaded into the OLE Object
Set Picture1.FormattedPicture = LoadPicture(Field3.Value)
 
End Sub
ON constate que Crystal à pensé à tout, car ce code n'est pas très compliqué.

IL faut :
1. Placer un objet OLE, appelé Picture1, dans un section, appelé Section3.
2. Traper l'événement Format de la Section du rapport.
3. Et dans l'événement Format, modifier l'objet Picture avec l'image qui se trouve sur votre disque. Par exemple :
Code :
1
2
3
4
SET Picture1.FormattedPicture = LoadPicture(Field3.Value)
 
Field3 pourait être un FormulaField qui retourne
"pic" + ToText({Hetype.Type,0}) + ".jpg"
Maintenat le plus compliqué c'est le point 2, car cela demande pas mal de notion COM en Delphi. Dans le fichier CRAXDRT_TLB.pas on a la section "ISection" et sont événement "ISectionEvent".
Il faut faire un wrappeur pour ces deux interface.
Voici ce que je vous propose :

Pour l'en-tête
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  TCrSectionFormat = procedure (Sender: TObject; const pFormattingInfo: IDispatch) of object;
 
  TCrSection = class(TOleServer)
   private
     FOnFormat : TCrSectionFormat;
     FIntf:        ISection;
     FUNCTION      GetDefaultInterface: ISection;
   protected
     procedure InitServerData; override;
     procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
   published
     property OnFormat: TCrSectionFormat READ FOnFormat WRITE FOnFormat;
   public
     constructor CREATE(AOwner: TComponent); override;
     destructor  Destroy; override;
     procedure Connect; override;
     procedure ConnectTo(svrIntf: ISection);
     procedure Disconnect; override;
     property  DefaultInterface: ISection READ GetDefaultInterface;
     property Intf:ISection READ FIntf;
  end;
Pour le coprs :

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ TCrSection }
 
procedure TCrSection.Connect;
var
  punk: IUnknown;
begin
  IF FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk AS ISection;
  end;
end;
 
procedure TCrSection.ConnectTo(svrIntf: ISection);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;
 
constructor TCrSection.CREATE(AOwner: TComponent);
begin
  inherited CREATE(AOwner);
end;
 
destructor TCrSection.Destroy;
begin
  inherited Destroy;
end;
 
procedure TCrSection.Disconnect;
begin
  IF Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;
 
FUNCTION TCrSection.GetDefaultInterface: ISection;
begin
  IF FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;
 
procedure TCrSection.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{AF3768D4-6120-4E28-96DD-63FD2DC27B7A}';
    IntfIID:   '{AF376806-6120-4E28-96DD-63FD2DC27B7A}';
    EventIID:  '{AF37684B-6120-4E28-96DD-63FD2DC27B7A}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;
 
procedure TCrSection.InvokeEvent(DispID: TDispID;
  var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
   1: IF Assigned(FOnFormat) then
            FOnFormat(Self, Params[0]);
  end; {case DispID}
end;

Vous ajouter cela dans le fichier CRAXDRT_TLB.pas
Maintenat vous avez une classe TCrSection qui ce connecte sur n'importe quel section du rapport et vous propose l'événement OnFormat(...)

Pour l'utiliser c'est simple :
Code :
1
2
3
  FRptSection := TCRSection.CREATE(nil);
  FRptSection.OnFormat := FormatOLE;
  FRptSection.ConnectTo(crReport.Sections.Get_Item('DetailSection1'));
FormatOLE est votre procedure qui serra appelé par l'événement onFormat. C'est la dedans que vous coderai le chargement de l'image.

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
var
  strPath : string;
  oPicture: TPicture;
  pd: IPictureDisp;
  oBitmap : TBitmap;
{...}
 
          oPicture := TPicture.CREATE;
          try
            oBitmap := LoadGraphicsFile(strPath);
            oPicture.Bitmap := oBitmap ;
            GetOLEPicture(oPicture, pd);
            Picture1.FormattedPicture := pd;
          finally
            oPicture.Free;
            oBitmap.Free;            
            oBitmap := nil;            
            pd := nil;
          end;
Voilà si vous voulez en savoir plus sur la création de la classe TCrsection, allez plutôt sur le forum Delphi.
Bonne chance
PParijs est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 21h23.


 
 
 
 
Partenaires

Hébergement Web