DELPH中启动系统”日期和时间“用什么API?

解决方案 »

  1.   

    gettime
    procedure TForm1.Timer1Timer(Sender: TObject);
    var
      DateTime : TDateTime;
      str : string;
    begin
      DateTime := Time;  // store the current date and time
      str := TimeToStr(DateTime); // convert the time into a string
      Caption := str;  // display the time on the form's caption
      { Note This could have been done with the following line of code:
        Caption := TimeToStr(Time); }
    end;
      

  2.   

    启动系统”日期和时间“?什么意思 启动控制面板中的日期时间设置吗
    ShellExcute就可以
      

  3.   

    ShellExecute(...)//可以把开一个可执行程序。
      

  4.   

    //uses shellapi;
    winexec(PChar('rundll32.exe shell32.dll,Control_RunDLL timedate.cpl'),SW_SHOWNORMAL);