Sleep in Delphi 3.0 with win95 but in Delphi 1.0 with win 3.11 ?

I use the SLEEP function in Delphi 3.0 with win 95.
But I have to use a similar function with win 3.11.
Sleep doesn't exist under win 3.11.
Do exist a similar function under win 3.11?
Thanks.
nk51Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
interConnect With a Mentor Commented:
Sorry, I think there is no delay in delphi 1.0 but you can use the following (be sure to include WinProcs)

procedure Wait(Msec : longint);
var
  b : longint;
begin
  b := GetTickCount;
  while (GetTickCount - b) < Msec do
     Application.ProcessMessages;
end;

Regards,  igor


0
 
interCommented:
You can use Delay with Delphi 1.0
0
 
kjtengCommented:
You can also use GetTickCount API
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
nk51Author Commented:
It doesn't work with delay.

Do I specify an Unit in "uses" ?

0
 
nk51Author Commented:
It doesn't work with delay.

Do I specify an Unit in "uses" ?

0
 
d003303Commented:
right, the uses clause specifies a list of used units. Just add WinProcs to it, like

uses Windows, Forms;
->
uses Windows, Forms, WinProcs;

Slash/d003303
0
 
nk51Author Commented:
Your procedure Wait is good.
Thanks.
0
 
interCommented:
You're wellcome ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.