Subj : Re: Where did the Time Delay go ??? To : borland.public.cpp.borlandcpp From : " Bruce Salzman" Date : Mon Jul 28 2003 02:59 pm > ok i was doing a dos prog... > but if i was making a win 16 or win32 program .... which command can i then > use insted of delay ??? > > Here a function I've used in the past. It uses mmsystem.h and a message loop to keep the UI alive. void Delay(ULONG num_ms) { ULONG t = timeGetTime() + num_ms; MSG Msg; while (timeGetTime() < t){ if (PeekMessage(&Msg, 0,0,0, PM_REMOVE)){ TranslateMessage(&Msg); DispatchMessage(&Msg); } } } HTH, Bruce .