Solved

How to translate "Wait window"

Posted on 1998-11-05
4
285 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thank's for your help !
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now