Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 1998-09-09
8
Medium Priority
?
320 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 200 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

609 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