Solved

SendMessage question

Posted on 1997-07-14
2
201 Views
Last Modified: 2010-04-06
I just want to know what parameter use to send a message to all windows of a same delphi3 application.
0
Comment
Question by:fmichaud061597
[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
2 Comments
 
LVL 1

Accepted Solution

by:
ygolan earned 20 total points
ID: 1338880
If all the windows are actually Delphi forms, the following code will do it :

For i := 0 to (Screen.FormCount - 1) do
  SendMessage(Screen.Forms[i].Handle, ......)

Note that you can use Screen.Forms[i].Perform(...) instead of SendMessage, this will be more efficient.

To send a message to the child windows of the forms as well, use
  Screen.Forms[i].Broadcast(...) instead.

To send a message to *all* windows of an application, including those not created as forms ar as controls in forms, you will need to use the API function EnumWindows.
0
 

Author Comment

by:fmichaud061597
ID: 1338881
Thanks for the awnser!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month7 days, 2 hours left to enroll

622 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