Solved

How to Pop Up a message to user

Posted on 2004-09-09
6
197 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Panda2.5's Release Date The latest Google Panda algorithm update was released late on Tuesday, September 27th, and was noticed to have started affecting website traffic on Wednesday, September 28th.  Google did not proactively announce this update,…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
An overview of how to create reports in Adobe Analytics (formerly Omniture Site Catalyst) using pageNames, events, eVars and props. This video will show you how to install the Omniture Debugger tool so can see (and test) what is being passed int…
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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now