Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

system clock

Status
Not open for further replies.

wduty

Programmer
Jun 24, 2000
271
US
Does anyone know how to make the system-clock dialog appear?
--Will Duty
wduty@radicalfringe.com

 
You can try to send the command line "clock.exe" by a function that must be WinExec in Visual C++ (but I'm not sure of it)

Try Start - Run int your Start menu
and type clock, it would do the same

Is that what you want?
 
Actually you were right, it is WinExec!
If you run control.exe from this function you can make any of the control panel windows show up (fonts, printers, etc.)

So the barebones command-line program to make the clock dialog pop-up would be:


#include <windows.h>
int main()
{
WinExec(&quot;control.exe date/time&quot;, SW_NORMAL);
return 0;
}
--Will Duty
wduty@radicalfringe.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top