Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to translate "Wait window"

Posted on 1998-11-05
4
Medium Priority
?
294 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 150 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

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

670 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