用Delphi怎么实现在更改系统的时间,还有怎么调用另一个程序文件呢??
急----
谢谢大侠帮忙。。

解决方案 »

  1.   

    The SetSystemTime function sets the current system time and date. The system time is expressed in Coordinated Universal Time (UTC). BOOL SetSystemTime(    CONST SYSTEMTIME *lpSystemTime  // address of system time to set 
       );
     ParameterslpSystemTimePoints to a SYSTEMTIME structure that contains the current system date and time. 
    The wDayOfWeek member of the SYSTEMTIME structure is ignored.  Return ValuesIf the function succeeds, the return value is nonzero.
    If the function fails, the return value is zero. To get extended error information, call GetLastError. ResWindows NT: The SetSystemTime function fails if the calling process does not have the SE_SYSTEMTIME_NAME privilege. This privilege is disabled by default. Use the AdjustTokenPrivileges function to enable this privilege and again to disable it after the time has been set. For more information about security privileges, see Privileges. 
    Windows 95: Security privileges are not supported or required.See AlsoAdjustTokenPrivileges, GetSystemTime, SetSystemTimeAdjustment, SYSTEMTIME, SystemTimeToTzSpecificLocalTime
      

  2.   

    The ShellExecute function opens or prints a specified file. The file can be an executable file or a document file. See ShellExecuteEx also. HINSTANCE ShellExecute(    HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );
     ParametershwndSpecifies a parent window. This window receives any message boxes that an application produces. For example, an application may report an error by producing a message box.lpOperationPointer to a null-terminated string that specifies the operation to perform. The following operation strings are valid:String Meaning
    "open" The function opens the file specified by lpFile. The file can be an executable file or a document file. The file can be a folder to open.
    "print" The function prints the file specified by lpFile. The file should be a document file. If the file is an executable file, the function opens the file, as if "open" had been specified.
    "explore" The function explores the folder specified by lpFile.
      

  3.   

    使用setSystemTime修改时间,它的参数解释如下
    typedef struct _SYSTEMTIME {  // st 
        WORD wYear; 
        WORD wMonth; 
        WORD wDayOfWeek; 
        WORD wDay; 
        WORD wHour; 
        WORD wMinute; 
        WORD wSecond; 
        WORD wMilliseconds; 
    } SYSTEMTIME; 
    第二个问题:使用winexec函数或者shellexecute函数