Solved

How to translate "Wait window"

Posted on 1998-11-05
4
293 Views
Last Modified: 2010-04-04
Please help me how to translate these Foxpro's command into Delphi 4 :
1. wait window "the message" TIMEOUT 3
2. wait window "the message" NOWAIT

Thanks for your help.

Best regards,
apin

0
Comment
Question by:apin
[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
4 Comments
 
LVL 4

Expert Comment

by:BoRiS
ID: 1345715
apin

There is an API call WaitMessage that when called the app waits until a new message is sent...Or there is the API call SendMessageTimeOut...

Both of these I think is what you are looking for, check the win32,hlp file...

or create a function eg...

function WaitWindow( var MyMsg: String; TimeOut: integer);

then used someting like so...

WaitWindow('Please Wait', Sleep(3000));//for three seconds

Later
BoRiS

0
 
LVL 7

Expert Comment

by:Motaz
ID: 1345716
You can use ShowMessage('The message');
but this will stop the program until you click ok button.
but if you want to show a message for a certien time you must make a form and timer. The OnTimer event contain Close method to that form. Timer interval contain the period you want to stay in miliseconds.

Motaz

0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1345717
1. To show a message and wait go ShowMessage('MyMessage');

2. To show a message the goes away after a little time do this

var
  Timer : MMResult;

Procedure SleepStop(uTimerID, uMessage: UINT;
                                dwUser, dw1, dw2: DWORD);

begin
  TimeKillEvent(Timer);
  MyForm.Close;
end;


..
MyForm.Show;
Timer := timeSetEvent(3000 {milliseconds}, 100, SleepStop, 0, TIME_ONESHOT);
..

Cheers,

Raymond.
0
 

Author Comment

by:apin
ID: 1345718
Thank's for your help !
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

617 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