Solved

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

Posted on 1998-09-09
8
316 Views
Last Modified: 2010-04-06
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.
0
Comment
Question by:nk51
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Expert Comment

by:inter
ID: 1339110
You can use Delay with Delphi 1.0
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1339111
You can also use GetTickCount API
0
 
LVL 5

Accepted Solution

by:
inter earned 50 total points
ID: 1339112
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:nk51
ID: 1339113
It doesn't work with delay.

Do I specify an Unit in "uses" ?

0
 

Author Comment

by:nk51
ID: 1339114
It doesn't work with delay.

Do I specify an Unit in "uses" ?

0
 
LVL 4

Expert Comment

by:d003303
ID: 1339115
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
 

Author Comment

by:nk51
ID: 1339116
Your procedure Wait is good.
Thanks.
0
 
LVL 5

Expert Comment

by:inter
ID: 1339117
You're wellcome ;-)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question