L laohe Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-08 #1 我是用OpenDialog1 OpenDialog1.filename取得路径及文件名,我想获取文件名中的后缀名,以确定下一步的执行,所有还请高手指点谢谢
L lujr Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-08 #3 例子: procedure TForm1.Button1Click(Sender: TObject); begin ; ;if OpenDialog1.Execute then ; ; ; showmessage(ExtractFileExt(OpenDialog1.filename)); end;
例子: procedure TForm1.Button1Click(Sender: TObject); begin ; ;if OpenDialog1.Execute then ; ; ; showmessage(ExtractFileExt(OpenDialog1.filename)); end;
L laohe Unregistered / Unconfirmed GUEST, unregistred user! 2002-02-08 #4 谢谢,下面是我测试的代码 if OpenDialog1.Execute then Edit1.text:=ExtractFileExt(OpenDialog1.FileName);