我作一个注销功能,需要关闭应用程序重新启动,请问如何实现呀
close;
    winexec(pchar(ExtractfilePath(application.ExeName)+application.ExeName),SW_SHOW);
我是这样做的
但是不能实现
请问高手如何实现呀

解决方案 »

  1.   

    把主界面hide,登录界面show出来,从新登录,登录成功后,主界面加载权限
    这样比较简单
      

  2.   

    用Api函数ExitWindowsEx(),这个函数有个参数可以设置重新引导系统的,具体你看帮助啦!
      

  3.   

    额的神呀,你把参数写错了:
    **************************************************************
    close;
        winexec(pchar(ExtractfilePath(application.ExeName),application.ExeName),SW_SHOW);
    **************************************************************
    ExtractfilePath(application.ExeName)是路径;
    application.ExeName是路径+文件名。这样就行了:
        close;
        winexec(pchar(application.ExeName),SW_SHOW);
      

  4.   

    下面是delphi帮助中的解释:
    ExeName property (TApplication)
    -------------------------------------------------------------------------------
    Contains the file name of the application's executable file including path information.Delphi syntax:property ExeName: string;C++ syntax:__property AnsiString ExeName = {read=GetExeName};DescriptionUse ExeName to obtain the name of the executable file for the application. ExeName is the fully-qualified name, including the path to the application抯 executable.The name of the application is the root name of the project. By default, this name is project1. To change the ExeName, save the project by the desired new root name and rebuild the application. ExeName will reflect the change to the project file name.ExeName is a read-only property.
      

  5.   

    抯 = 's
    所以
    application抯=application's是网页显示文本的问题