我找到了VB函数ShowPhotoPrintingWizard
:
CommonDialog.ShowPhotoPrintingWizard( _
ByVal Files As VARIANT _
) As HRESULT
如何在Delphi中调用它或获得相同的功能?我正在使用Delphi 2010。
答案 0 :(得分:6)
我认为对于单个文件可能是这种方式:
uses
ComObj;
procedure TForm1.Button1Click(Sender: TObject);
var
CommDlg: OleVariant;
begin
CommDlg := CreateOleObject('WIA.CommonDialog');
CommDlg.ShowPhotoPrintingWizard('d:\Image.jpg');
end;
或类似的多个文件:
procedure TForm1.Button1Click(Sender: TObject);
var
Files: OleVariant;
CommDlg: OleVariant;
begin
CommDlg := CreateOleObject('WIA.CommonDialog');
Files := CreateOleObject('WIA.Vector');
Files.Add('d:\Image 1.jpg');
Files.Add('d:\Image 2.jpg');
CommDlg.ShowPhotoPrintingWizard(Files);
end;