函数ExtractFileExt可以返回文件扩展名

解决方案 »

  1.   

    1.ExtractFileExt(savedialog.filename)
    2.inputbox:按下取消返回缺省值,不输入任何东西按确定返回'',如果一定要知道按了什么,建议用inputquery
      

  2.   

    If the application needs to know whether the user chooses OK or Cancel, use the InputQuery function instead.
    这是delphi 的help说的,我想你能看懂把
      

  3.   

    If the user chooses the Cancel button, InputBox returns the default string. If the user chooses the OK button, InputBox returns the string in the edit box.
    你看一看帮忙吧!
    如果你是看不懂,那就只能说大体为如果你取消,就返回你所传递的默认值,如果按了确定的话,就返回文本框的信息。
      

  4.   

    来来来,40分,分一点了;
    1:
    ExtractFileExt(savedialog.filename)//这个!
    ExtractFilePath(savedialog.filename)
    ExtractFiledri(savedialog.filename)
    ExtractFileDrive(savedialog.filename)
    2:
    一定有返回值,你可以给它默认值;
    建议你自己写一个