Bonjour,
Je souhaite utiliser l'assistant Photograhie Windows pour imprimer des photos s�lectionn�es via mon programme.
J'ai r�ussi, avec l'aide de NABIL74 de le faire sous Delphi.
La discussion se trouvant ici
Voici le code de NABIL74 (merci � lui) :
Code delphi : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 uses ActiveX, ComObj, StdCtrls; procedure ShowPhotoPrintWizard(Files: TStringList); var I: Integer; CommonDialog: OleVariant; Vector: OleVariant; begin if not Assigned(Files) then Exit; CommonDialog := CreateOleObject('WIA.CommonDialog'); Vector := CreateOleObject('WIA.Vector'); for I := 0 to Files.Count - 1 do Vector.Add(Files[i]); CommonDialog.ShowPhotoPrintingWizard(Vector); Vector := Unassigned; CommonDialog := Unassigned; end;
Utilisation :
Code delphi : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 procedure TForm1.Button2Click(Sender: TObject); var List: TStringList; begin List := TStringList.Create; with List do try Append('D:\image 3.jpg');//la 1ère photo Append('D:\4.jpg');//la 2ème photo ShowPhotoPrintWizard(List); finally Free; end; end;
Je n'arrive pas � invoquer CommonDialog et Vector
Quelqu'un peut-il m'aiguiller ?
Merci![]()
Partager