Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Opening the Date/Time Properties Dialog
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Do you need the API call that would bring up the Date/Time Properties Dialog?
The code below brings up the dialog that you get when you double click on the time in the task bar.  | |  | | function GetSystemDir: string;
var
SysDir: PChar;
begin
GetMem(SysDir, MAX_PATH);
GetSystemDirectory(SysDir, MAX_PATH);
Result := StrPas(SysDir);
FreeMem(SysDir, MAX_PATH);
if (Result[Length(Result)] <> '\') then
Result := Result + '\';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(0, nil, PChar(GetSystemDir + 'rundll32.exe'),
PChar('shell32.dll,Control_RunDLL Timedate.cpl'), PChar(GetSystemDir),
SW_SHOW);
end; | |  | |  | You don't like the formatting? Check out SourceCoder then!
Comments:
|