Solved

How to Pop Up a message to user

Posted on 2004-09-09
6
203 Views
Last Modified: 2013-11-28
Newb question:  How do I pop up a message to the user if the QUERY got no results to show in my DBGRID?
0
Comment
Question by:VirtueTech
  • 4
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 500 total points
ID: 12019359
ADOQuery.Open
if (ADOQuery.IsEmpty) then
  ShowMessage('no records returned')

works the same for TQuery
0
 

Author Comment

by:VirtueTech
ID: 12019481
Thanks.

How can I change the popup window title/caption?
0
 

Author Comment

by:VirtueTech
ID: 12019518
Nevermind I found it. Thanks.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12019573
mmm... the quick and dirty way:

procedure ShowMessageWithTitle(const Msg, Title:string); //use this procedure, provide message and title
var
  s:string;
begin
  s:=Application.Title; //save the original title
  Application.Title:=Title; //put the title you want in your message box
  ShowMessage(Msg);
  Application.Title:=s //restore original title
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessageWithTitle('a big long message', 'with title')
end;
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12019589
or the right way... lol
MessageBox(Handle, 'The message here', 'The title here', 0)
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12019597
guess the other wasn't so quick... =o(
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10 Round Image 2 128
URL for downloading Google Chrome for Win XP 2 157
Multiple image collision 13 75
Tembedded WB animatid gifs not animated on some pcs 2 80
Marketing can be an uncomfortable undertaking, especially if your material is technology based. Luckily, we’ve compiled some simple and (relatively) painless tips to put an end to your trepidation and start your path to success.
Learn about the eCommerce marketing trends for the year ahead.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

777 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