就是在调用shellexecute打开一个txt文件之后能否用同样的方法关闭它

解决方案 »

  1.   

    试试 findfirstfile  然后 fileclose .都是wapi.
      

  2.   

    to conquer(戏子):
    var FileHandle: integer;
     FileHandle:= FindFirstFile(Pchar('C:\mpinfo.txt'),nil);
     FindClose(FileHandle);
    我这样写法不对 高手能否给个例子
      

  3.   

    恐怕要关进程
    hadle:=findindow('word.exe',nil);
    closewindow(hadle)
      

  4.   

    to liaokuo(辽阔):
    因为word不一定是由本程序调出的 所以关进程不可靠 
      

  5.   

    shellexecute打开的是关联程序,所以,先找出.txt的关联,然后,看你的.txt是否正在使用,若是,就sendmessage,关了那个关联程序