delphi打开word文件(刚刚学会的嘿嘿~)
时间:2010-09-02 来源:zxdelphi
form1上需要opendialog1、button1、edit1。
uses shellapi;

procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.Execute then
//ShellExecute(handle,'open',pchar(opendialog1.FileName),nil,nil,SW_SHOW ); //2个的执行效果貌似一样
ShellExecute(Form1.handle,'open',pchar(opendialog1.FileName),nil,nil,SW_SHOWNORMAL);
edit1.Text:=opendialog1.FileName;
end;
相关阅读 更多 +
排行榜 更多 +