Solved

How to translate "Wait window"

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

785 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