Solved

How to translate "Wait window"

Posted on 1998-11-05
4
292 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 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